• Breaking News

    Tuesday, May 24, 2022

    Android Dev - Weekly discussion, code review, and feedback thread - May 23, 2022

    Android Dev - Weekly discussion, code review, and feedback thread - May 23, 2022


    Weekly discussion, code review, and feedback thread - May 23, 2022

    Posted: 23 May 2022 05:00 AM PDT

    This weekly thread is for the following purposes but is not limited to.

    1. Simple questions that don't warrant their own thread.
    2. Code reviews.
    3. Share and seek feedback on personal projects (closed source), articles, videos, etc. Rule 3 (promoting your apps without source code) and rule no 6 (self-promotion) are not applied to this thread.

    Please check sidebar before posting for the wiki, our Discord, and Stack Overflow before posting). Examples of questions:

    • How do I pass data between my Activities?
    • Does anyone have a link to the source for the AOSP messaging app?
    • Is it possible to programmatically change the color of the status bar without targeting API 21?

    Large code snippets don't read well on Reddit and take up a lot of space, so please don't paste them in your comments. Consider linking Gists instead.

    Have a question about the subreddit or otherwise for /r/androiddev mods? We welcome your mod mail!

    Looking for all the Questions threads? Want an easy way to locate this week's thread? Click here for old questions thread and here for discussion thread.

    submitted by /u/AutoModerator
    [link] [comments]

    Weekly Who's Hiring Thread - May 23, 2022

    Posted: 23 May 2022 06:00 AM PDT

    Looking for Android developers? Heard about a cool job posting? Let people know!

    Here is a suggested posting template:

    Company: <Best Company Ever>
    Job: [<Title>](https://example.com/job)
    Location: <City, State, Country>
    Allows remote: <Yes/No>
    Visa: <Yes/No>

    Feel free to include any other information about the job.

    submitted by /u/AutoModerator
    [link] [comments]

    UseCase vs Repository

    Posted: 23 May 2022 11:36 PM PDT

    Hi everyone! So I've been reading and trying to understand about UseCase in android and I'm beginning to get the idea of its usefulness. However one thing keeps bugging me.

    Imagine if a ViewModel needs to perform Create, Read, Update, and Delete operations and these operations are encapsulated within their respective usecases. Does this mean the ViewModel would need all 4 createUseCase, updateUseCase, readUseCase, and deleteUseCase passed to the constructor of the view model. Why can't I just use a single repository class that contains all these CRUD functions and still maintain "clean architecture"?

    Most online articles I've read use maximum of 2 usecases within the constructor of the view model for the sake of brevity, but none have talked about when a ViewModel needs a bunch of usecases to duly perform their functions

    submitted by /u/echoeyecodes
    [link] [comments]

    Jetpack Compose Color libraries that cover many things you might need about colors. Detect colors with name from screen or image. Utility library with material design 2 or 3 colors shades or tones, 12 different color pickers to select solid color or gradient from linear, sweep and more options

    Posted: 23 May 2022 08:26 AM PDT

    Hi Folks, Sharing the following article about ANR. We were experiencing multiple ANRs on our broadcast receivers and services. We wrote this article after gathering our learnings about those ANRs. Please let me know your suggestions. Would be happy to discuss ANRs in your apps too.

    Posted: 23 May 2022 10:32 PM PDT

    Android process

    Posted: 23 May 2022 11:26 PM PDT

    is there a website or an app that contian libraries or tips for processes we need in development ...like push notification process ...chatting process ...fetching process or even for advanced process that we may need its steps to develop full app ...something like codegripper?

    submitted by /u/engkhaledeisa
    [link] [comments]

    CLI utility to convert Jetpack Compose compiler metrics and reports to beautified HTML page

    Posted: 23 May 2022 08:28 AM PDT

    Vanilla Dagger Practices

    Posted: 23 May 2022 03:47 AM PDT

    Hello all!

    I have created a simple android application that shows how to share instances between application, activities, and fragments. If you wonder how components - modules are managed in some special-simple cases(Subcomponents, Provider Interfaces, etc.) in Vanilla Dagger, you can get insight from the codebase. All the commit descriptions contain the case and the implementation details.

    I tried to keep the application as simple as possible to highlight dagger usage.

    Any feedback will be appreciated.

    https://github.com/cifo19/VanillaDaggerPlayground

    submitted by /u/cifo19
    [link] [comments]

    Modern Android Techniques - An App Builders Workshop

    Posted: 23 May 2022 01:35 PM PDT

    about android cache

    Posted: 23 May 2022 10:17 PM PDT

    hello i have a question. After deleting the cache of the app, running (booting) speed became more faster. why is that?

    submitted by /u/DareFinancial2701
    [link] [comments]

    I am building an MVVM project and I am getting this Runtime Exception.

    Posted: 23 May 2022 10:14 PM PDT

    java.lang.RuntimeException: Unable to instantiate application com.example.cryptofinaltest.NotesApplication package com.example.cryptofinaltest: java.lang.ClassNotFoundException: Didn't find class "com.example.cryptofinaltest.NotesApplication" on path: DexPathList[[zip file "/data/app/~~8oktCt4HIuTEMZiEBv1i1g==/com.example.cryptofinaltest-9D7IWH6gUFsApYfmQk21ew==/base.apk"],nativeLibraryDirectories=[/data/app/~~8oktCt4HIuTEMZiEBv1i1g==/com.example.cryptofinaltest-9D7IWH6gUFsApYfmQk21ew==/lib/x86_64, /system/lib64, /system_ext/lib64]]

    The debug text is this https://pastebin.com/gCe5DAxK

    please help...

    submitted by /u/Direct_Clue_5731
    [link] [comments]

    Custom extension to include existing ones

    Posted: 23 May 2022 09:20 PM PDT

    Is it possible for a custom extension to act as if multiple existing ones? For example with compose previews I always copy paste the same list of '@Preview' for light/dark mode, rtl layout, big font etc. Is it possible to create @CustomPreview which could replace all of them?

    submitted by /u/BligenN
    [link] [comments]

    Shot in the dark - anyone know where we implement a Navigation Drawer in the Android Basics in Kotlin course?

    Posted: 23 May 2022 07:54 PM PDT

    I _know_ I did a codelab where I implemented a navigation drawer, I just cant find it. If anyone has done the codelabs in this course, and knows where I can find it please let me know. https://developer.android.com/courses/android-basics-kotlin/course?utm_source=gDigital&utm_medium=website&utm_campaign=gwgsite

    submitted by /u/Place-Wide
    [link] [comments]

    Best Practices: Are we building apps for everyone?

    Posted: 23 May 2022 09:15 AM PDT

    According to Google, over 1 billion people live with some form of disability.

    Android Accessibility plays a significant role here.

    Start adding the contentDescription for all the user interface elements as common practice.

    if the image is decorative and does not add any relevant information, it's not necessary to add a description, and we can set the contentDescription attribute to null.

    Another option is to hide it from screen readers altogether using the importantForAccessibility attribute. This way, the image will not receive focus and will be ignored by TalkBack.

    submitted by /u/myinnos
    [link] [comments]

    App Flow of an Android App?

    Posted: 23 May 2022 09:11 AM PDT

    Hey Guys, I am a web dev and want to learn Android Dev as well and I was confused about the app flow of an android app.

    Let's suppose I build my backend using NodeJS/Express and I use my Android app as front-end, What is the "Middle Man" between the View and the data that is sent from the back-end?

    Backend - "Middle Man" - Activity

    Please help me out. If this sounds confusing just let me know.

    submitted by /u/userknownunknown
    [link] [comments]

    Get preregistered user's email list

    Posted: 23 May 2022 01:24 PM PDT

    Hi guys !

    I have a simple question.
    I'm developing a game that is in the pre-register state. Once the game is out to play, google notifies all users who preregistered in their emails about the game release. Is there a way to get all preregistered users' email lists In case I want to implement specific things?

    submitted by /u/Pedro_prlco
    [link] [comments]

    Another Open-Source Flutter Android App: TeamViewer Alternative

    Posted: 22 May 2022 05:46 PM PDT

    Single source file native app (without native_app_glue)

    Posted: 23 May 2022 06:18 AM PDT

    Simple example of a native app without Java/Kotlin, resources, glue code, Loopers, unnecessary synchronisation, standard UI, etc.

    https://github.com/jbendtsen/stuff/blob/master/android-colors.c

    Could be useful as a starting point for writing low-level cross-platform apps with visual parity.

    submitted by /u/JwopDk
    [link] [comments]

    Published beta watch face and have an issue

    Posted: 23 May 2022 04:49 AM PDT

    Hi everyone.

    After a few years designing watch faces for Tizen I moved to wear OS and have an issue.

    I rolled out a beta version for a new watch face. The watch face is not available under my dev page within the store, even when I filter by watches ( Device). If I follow the link available in Play console it takes me to the watch face page but says "Your device is not supported". Searching the watch face at the store doesn't show any results.

    It is not the first time I roll out an app to the play store ( But first watch face).

    Did I miss something?

    Thank you.

    submitted by /u/MusicIsLife1122
    [link] [comments]

    Android developers of Reddit, explain like I'm 5 : what are the SOLID principles?

    Posted: 23 May 2022 07:54 AM PDT

    An open standard to replace GMS?

    Posted: 23 May 2022 03:57 AM PDT

    I'm sure I can't be the first to think of this, so is there an OSS replacement for GMS in the works already?
    If not, is anybody interested in starting a project?

    I had the idea because I've been using the P40 Pro for over a year now, and there are a surprising amount of apps that require GMS. And some are not just convenient but actually quite necessary for my commute f.e. Yeah, there are workarounds like GSpace or running a container like VPhoneGaGa. But those are slow to start, cumbersome and I ask myself more and more, WHY do we even need this?
    There are so many open standards in the tech world, why can't we create one for Android?

    submitted by /u/dschramm_at
    [link] [comments]

    Survey about app marketing services

    Posted: 23 May 2022 12:36 AM PDT

    Hi Everyone,

    I am Ravi. My team and I are conducting a small survey to get an idea about different Mobile App Marketing services taken by different App Developers, Publishers, and Owners or services provided by various App Marketing Agencies. It is also to see whether they are satisfied with App Marketing agencies' services or not.

    Kindly fill out this short form. It will just take 30 seconds.

    PS: Even if you have not conducted any such activities, please fill out the form. It will help us to know about the trends in the market.

    submitted by /u/App_fiillip
    [link] [comments]

    About Jetpack Navigation Component

    Posted: 22 May 2022 08:39 PM PDT

    So google encourage the devs to use Single Activity Architecture when making an application that uses Navigation Component, but I'm not too familiar with it and wonder I think it will be so much pain if we're using Single Activity Architecture like hiding certain views when moving between Fragments (ex: Hide Bottom Navigation View that bound to an activity), no onActivityResult-like function.

    But it also has its advantages like easy data sharing between fragments by using ViewModel, safe args etc. So I'm a bit confused would you recommend other devs to use Jetpack Navigation Component and Single Activity Architecture when building a new project?

    submitted by /u/myrmecii
    [link] [comments]

    How do you guys handle credentials provided to Google for app review?

    Posted: 22 May 2022 11:55 PM PDT

    So i have added test user credentials to the play console as my app uses google login and the reviewer asked me to provide login credentials. But can I do anything about the fact that the reviewer might be unable to login to the app using his device as google might say its an untrusted device. Any thoughts on this?

    submitted by /u/ResponsibilityOk9913
    [link] [comments]

    what are the best solutions to rebuild/remake an old app made with old Java?

    Posted: 23 May 2022 05:34 AM PDT

    So at my new job they gave me a really old app.. I was supposed to optimize it.. but the code is in Java an lots of libraries used are deprecated.. the android api target is level 27. Any advice or insight is the most welcome

    submitted by /u/Highway_Inside
    [link] [comments]

    Is it okay to go Kotlin for Development and Java for DSA

    Posted: 22 May 2022 10:13 PM PDT

    I am Switching from web dev to android? any tips or roadmap to follow

    submitted by /u/Vast-Ad-2863
    [link] [comments]

    No comments:

    Post a Comment