• Breaking News

    Tuesday, April 20, 2021

    Android Dev - Weekly Questions Thread - April 20, 2021

    Android Dev - Weekly Questions Thread - April 20, 2021


    Weekly Questions Thread - April 20, 2021

    Posted: 20 Apr 2021 06:00 AM PDT

    This thread is for simple questions that don't warrant their own thread (although we suggest checking the sidebar, the wiki, our Discord, or 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!

    Also, please don't link to Play Store pages or ask for feedback on this thread. Save those for the App Feedback threads we host on Saturdays.

    Looking for all the Questions threads? Want an easy way to locate this week's thread? Click this link!

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

    Best free course for beginners?

    Posted: 20 Apr 2021 03:20 AM PDT

    CoroutineScope and coroutineContexts

    Posted: 20 Apr 2021 06:54 AM PDT

    Scoped Storage - File Browsing Issue

    Posted: 20 Apr 2021 07:58 AM PDT

    Hi everyone,

    Yet another Scoped Storage Issue! Possibly!

    My app used to create a folder under "/storage/emulated/0/<myfolder>" to hold files. Now with the scoped storage, I'm forced to migrate the entire thing to "/storage/emulated/0/Android/Data/<my app package>/files/", which is sorta fine, but.....

    A functionality from my app is to be able to browse and upload files from the system file picker. This included the files that I used to create under "/storage/emulated/0/<myfolder>", which I was able to see on the system file picker UI. But now, since I'll be migrating, I should be able to pick files from " "/storage/emulated/0/Android/Data/<my app package>/files/<myfolder>" which I'm not even able to find in the file picker!

    All I can see is "/storage/emulated/0/Android/". If I can't browse to MY app specific folder that MY app created, then what is the whole point!?? Am I missing something or is it something everyone is facing ??

    Any help/insights would be appreciated!

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

    Unofficial Android Studio Build for Apple Silicon (by dsa28s)

    Posted: 19 Apr 2021 09:48 AM PDT

    Unofficial Android Studio Build for Apple Silicon (by dsa28s)

    Someone on GitHub has built Android Studio for Apple Slilcon!

    Download it here: https://github.com/dsa28s/android-studio-apple-m1/releases

    Currently, the built-in JDK is still for Intel processor. To replace with arm64 JDK, you can refer to my solution: https://github.com/dsa28s/android-studio-apple-m1/issues/6

    Then you will get Android Studio runs smoothly on M1 Mac!

    Unofficial Android Studio for Apple Silicon

    Thanks for dsa28s's arm64 build!

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

    [DEV] Quit my job back in Jan 2020 and used all my savings to fund the development of the new version of my app. Here are the takeaways, the new version, and some Premium codes.

    Posted: 20 Apr 2021 08:23 AM PDT

    I'll try to keep this post as short as possible.

    Like many here, I did the corporate job for a while but after some time I grew tired of it. In Jan 2020 I made the decision of using all my savings to keep me afloat for one year while building the next version of Memorigi, my todo-list, calendar, and reminder app. I wanted to create something way better than the status quo. So, I gave my two weeks notice, moved back to Costa Rica, and started working on it day and night for the last year and 3 months. No vacations. No holidays. Just work.

    Fast forward to today. A few weeks ago Memorigi surpassed the 500000 downloads barrier and today I'm officially releasing Memorigi 5.0 on Android and Web. Here are some takeaways that might help other fellow devs trying to do something similar.

    • Don't do what I did unless doing it it's the ONLY thing that matters to you. There are better ways to achieve similar results.
    • If you still want to do it and you understand the risks, then burn your boats and go all in. No plan B. It'll make you focused, dedicated, and committed.
    • Your WHY must be bigger than money, fame, and all that crap. Always remember why are you doing what you are doing. This is important. The WHY is going to be your daily drive. It could be your family. It could be your peace of mind. It could be helping others. Think it through really well.
    • You are going to be scare and that's good. Embrace your fear, use it to your favor.
    • Work every day on your project, even when you don't want to. You will have bad days guaranteed but that's no reason to stop. If you are tired, rest. If you are hungry, eat. If you are exhausted, sleep. Just remember to always keep moving forward. Everyday bits add up at the end.
    • You're going to sacrifice a LOT! Time with friends, time with family, social life, etc. Working on your project is going to demand all of your time. Even in your sleep you'll keep solving problems. Be sure you understand this.
    • Try to have as much fun as you can. If you don't enjoy working on your project you'll quit really quick.
    • Enjoy the good days... and the bad ones too. Yes, sometimes everything will be great and sometimes you won't see any progress for weeks. Don't give up! Just remember your WHY and keep focused.
    • Trade perfect for done. I didn't finish all features but the current version is good enough.
    • And the last one is, believe in you! You have no idea how important this is. You have to believe in you if you want to pull this or anything off. Start every single day of this journey with you in front of the mirror saying "I believe in me. I can do this! I am doing this!".

    I hope you find these useful.

    Now, for the free 1-year Premium membership I want to do something with a ROI for this sub. Here is the only rule to participate:

    Make a top comment here asking something Memorigi-Android related that you think the answer could benefit other developers.

    For instance, you could ask about the architecture, its design, the tech stack, the journey, how I managed to get 500000 downloads, etc. Just, please don't ask about sensitive information. At the end of the day I'll handpick the 10 most valuable comments and DM their Premium memberships.

    Bests!

    R

    TL;DR; Quit my job, used my savings to create the next version of my app, worked day and night for over a year on it, learn some valuable lessons, don't know how it's going to turn out.

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

    Where can I find XML schemes for AndroidManifest.xml and friends?

    Posted: 20 Apr 2021 12:31 AM PDT

    I am creating a Java library to create Android manifests for generating APK files.

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

    RenderScript deprecated in Android 12, migration to Vulkan recommended

    Posted: 20 Apr 2021 02:31 AM PDT

    Need help with firebase authentication using facebook android sdk

    Posted: 19 Apr 2021 11:53 PM PDT

    https://stackoverflow.com/questions/67159346/getting-wrong-access-token-from-registercallback-method-of-facebook-loginbutton

    I am having trouble creating users in firebase using facebook login sdk in android studio. If anyone has encountered something similar please help.

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

    How can I use Firebase Dynamic deeplinks for Facebook ads ?

    Posted: 20 Apr 2021 05:44 AM PDT

    I want to run Facebook ads for my app using Firebase Dynamics deeplinks, but when in insert the link I get the following error :

    App Links Field Invalid:: The described URL doesn't have app links HTML meta tags. Use a different URL or a mobile deep link (eg 'mobileapp://). (#1487904)

    Is there a workaround so I can still use the current dynamic deeplinks ?

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

    A fragment -> auth flow-> bottom navigation w/ Navigation component/jetpack

    Posted: 20 Apr 2021 04:26 AM PDT

    I am looking for recommendations to a good resource to code along to such as a tutorial or articles or series of articles.

    My quest involves building an app that involves landing page, login/register fragments after which I am taken to a bottom navigation screen with 3 tabs. Each tab governs its own back stack.

    I am already familiar with navigating fragments from one screen to the next. I just want a resource that demonstrates moving from a home fragment to a screen that has tabs with their own navigation stacks. Prefereably also demonstrates conditional navigation(if logged in, skip login fragment)

    submitted by /u/sullen-wench-39
    [link] [comments]

    Will my app remove from google play on May 05 if I target SDK 29 and use requestLegacyExternalStorage = true?

    Posted: 19 Apr 2021 10:07 PM PDT

    I recieved an warning message which says,

    We've detected that your app contains the requestLegacyExternalStorage flag in the manifest file of 1 or more of your app bundles or APKs.

    I am targeting android 10 and use requestLegacyExternalStorage = true
    ,

    1. Will my app be removed from google play on May 5 th?
    2. Do I need to remove requestLegacyExternalStorage
      flag from manifest before May 5?
    3. Do I need to Update to target SDK to 30
    4. Is there any other changes need if I use target sdk 29 and requestLegacyExternalStorage = true?
    submitted by /u/Grouchy-Fig-8111
    [link] [comments]

    Modular Navigation with Jetpack Compose

    Posted: 19 Apr 2021 03:02 PM PDT

    Do you like changes in play developers dashboard?

    Posted: 20 Apr 2021 01:12 AM PDT

    I have seen that they have made changes, Do you like them? Why?

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

    OAuth Verification Request help?

    Posted: 19 Apr 2021 05:35 PM PDT

    Hi, I'm trying to add cloud saving to my game with the google play games services. From the google cloud platform I completed all steps and set the publishing status to production. It asked me to verify ownership of my website, and with that done, they sent me an email telling me to make sure I've completed all the rerquired steps. I'm wondering, what OAuth scopes for google APIs do I need for just cloud saving and achievements? And what's all that about I have to make a "... demo video demonstrating the OAuth grant process by users and explaining, in detail, the usage of sensitive and restricted scopes within the app's functionality for each OAuth client belonging to the project."?

    Any help would be greatly apreciated, I'm kinda stuck.

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

    Android-optimized version of SoundTouch

    Posted: 19 Apr 2021 01:48 PM PDT

    Password4j: a user-friendly library that supports modern cryptographic hash functions for your passwords!

    Posted: 19 Apr 2021 05:32 AM PDT

    Removing borders and ripple effect for Button() in Jetpack compose?

    Posted: 19 Apr 2021 04:24 PM PDT

    Im developing an app that creates Cardview-like objects, and am trying to remove the button border and ripple effect.

    What I have:

    https://imgur.com/IE6BY0I

    What I want (While still retaining button functionality (clickable)):

    https://imgur.com/Qc0ldkE

    Not only do I not know the attributes of Button that toggle this, I dont know the arguments. Much thanks

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

    New Play Console: Why isn't internal app sharing, under the "Testing" category?

    Posted: 19 Apr 2021 05:23 AM PDT

    Whats the new app review time?

    Posted: 19 Apr 2021 02:30 PM PDT

    I've submitted ever first app over 3 days ago for review. I did a closed testing, open testing and internal testing. They all say active but I cant see it in the play store I also for some reason can't choose a pre register track. Is this normal? This is the first app am releasing so I dunno how this works really. How pong does it now take for an app to be released thanks to covid

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

    Premature optimization is the root of all evil

    Posted: 19 Apr 2021 12:06 PM PDT

    I was struggling with CameraX for a few hours, wondering why the heck the analyze function was only called once.

    Yes yes I know, I have to call ImageProxy.close() at the end, and I did. But it still failed to work.

    Thing is I had a try-catch block right before the ImageProxy.close() call. After trying several things and being incredibly frustrated, I finally put the ImageProxy.close() call within a finally block, right after the try-catch and........it worked.

    I couldn't figure out why the heck that was required.

    And then I saw the unnecessary return statement that I had added inside the try as an optimization. Basically I was using MLKit's Barcode Scanner, and if no barcodes were detected, I was returning. And this caused the ImageProxy.close() call to not be invoked.

    I've made this mistake before, and it cost me a few hours when I should have been done with this task by now.

    So remember, don't be a smartass, sometimes, optimize later.

    Does anyone else have stories about premature optimization?

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

    No comments:

    Post a Comment