• Breaking News

    Tuesday, June 8, 2021

    Android Dev - Weekly Questions Thread - June 08, 2021

    Android Dev - Weekly Questions Thread - June 08, 2021


    Weekly Questions Thread - June 08, 2021

    Posted: 08 Jun 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]

    This sub is pointless if you can't ask general questions about Android programming .

    Posted: 08 Jun 2021 01:44 PM PDT

    I don't get why you can't ask questions about Android programming and development here. I can understand removing posts where someone is basically asking for others to debug and test their app or do their homework but every time I ask a question about general Android architecture it get's deleted. Yet people are still allowed to spam their stupid libraries they've made or blog spam, or ask questions about why their app that has copywritten material and trademark material in it has been removed. But you can't ask specific questions about android development. What the fuck is this sub for than?

    submitted by /u/in-noxxx
    [link] [comments]

    DraggableScaffold - A small compose library to help create drag to reveal UI

    Posted: 08 Jun 2021 08:19 AM PDT

    Room vs Services vs SharedPreferences? Which one to choose for a Timer App?

    Posted: 08 Jun 2021 11:42 AM PDT

    Hi sir. I was making a pomodoro timer app using kotlin. I wanted the timer to keep running when the app was closed. Should i use Room or Shared Preferences or Services?

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

    Gradle dependency license validation

    Posted: 08 Jun 2021 08:03 AM PDT

    Rust/C++ interop in the Android Platform

    Posted: 08 Jun 2021 02:23 PM PDT

    Run Custom Gradle Task After “build”

    Posted: 08 Jun 2021 08:07 AM PDT

    Multiple back stacks. A deep dive | by Ian Lake

    Posted: 07 Jun 2021 03:53 PM PDT

    Jetpack compose and viewmodel

    Posted: 08 Jun 2021 12:46 PM PDT

    I have a jetpack compose application and just one activity inside. Since I want to add viewmodels for business logic, i am not sure where to create them. I saw at some google documentation that they pass viewmodels to the compose functions, but somehow it doesnt feel right. I have also implemented a viewmodel line that, but I am not sure that it is every being cleared when I change the screen (the „oncleared" function from the viewmodel is never called, but new viewmodels are being created when I navigate back to the screen) I am missing the „scope" stuff that I was using with activities/fragments

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

    Can't install Intel HAXM, please help!

    Posted: 08 Jun 2021 03:09 PM PDT

    Hi all, hope I can post something like this here?

    Currently tearing my hair out trying to install Intel HAXM to use with Android Studio, but I can't get it to work. Here is what I have tried so far after troubleshooting:

    1. Uninstalled Avast
    2. Reinstalled Android Studio thinking that I had somehow unchecked it as an option - it doesn't appear in the list of items to download where it should
    3. Checked to make sure I have the right laptop requirements (I do - an Intel core i7 7th gen 7500U, which does support visualization
    4. Checked to make sure Hyper-V is disabled on my Windows Features (not even on the list), although it does appear on Task Manager> Performance as "Hyper-V support: Yes"
    5. Following above, on task manager> performance, Visualization is disabled.
    6. Went into BIOS, there was no option to turn on visualization or anything like it.
    7. Tried to install it via Android Studio, where sometimes I get this message:

    Unable to run Intel® HAXM installer: Cannot start process, the working directory 'C:\Users\[my name]\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager' does not exist

    And sometimes it just says "installation failed".

    1. Tried to install it directly, I think at one point it told me I didn't meet the system requirements (I do!), but after that it just said "failed".

    For info, my laptop is a Lenovo Yoga 510 and runs Windows 10. Would be grateful for any tips before I throw this bloody thing out the window.

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

    ELI5: Flipper - Cross-Platform Debugger

    Posted: 08 Jun 2021 10:19 AM PDT

    Safe-args analogue for Jetpack Compose

    Posted: 07 Jun 2021 11:28 PM PDT

    Hey everyone 😀 Recently I've posted an article about Jetpack Compose Navigation Component 🧭. It also features a small library I made that acts like safe-args plugin and more

    And here is the library itself

    https://github.com/levinzonr/compose-safe-routing

    Hope you will find it useful 😉

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

    Google Play Games Loads but then Quits? Any Ideas

    Posted: 08 Jun 2021 01:28 PM PDT

    Difference in implementation of VPN on Android vs iOS

    Posted: 08 Jun 2021 01:27 PM PDT

    For context in my country NSFW subreddits are banned. When I use to have an iPhone I would just turn on the vpn app and visit the NSFW subreddits in the Reddit app /Apollo app , I would not have to first kill the app and than open it again for the VPN to work and show subreddits that are banned. In Android if I turn on VPN and visit subbreddit on Reddit App / Sync for Reddit app it doesn't loads as if I don't have the VPN on it only starts loading the banned subreddits when I first kill the app and than reopen the app than it shows the banned subreddits. Any ideas why is this the case on Android?

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

    Is Bundle also as efficient as ArrayMap?

    Posted: 08 Jun 2021 08:53 AM PDT

    Optimising Android app performance with ArrayMap | by Mohammed Rampurawala | Medium
    This article recommends to use ArrayMap for key value data structure, But the Bundle put & get methods also use ArrayMap<String, Object> internally in the BaseBundle class & with bundle we don't have to cast to appropriate data type right, so if they efficiency is same can we use Bundle Instead of ArrayMap?

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

    Writing Firebase Firestore Rules

    Posted: 08 Jun 2021 12:05 PM PDT

    After using firebase as my backend for almost all apps that I build. The only thing I think that daunts beginners is firebase rules.

    If you don't validate requests from your app then you might lose user data, or pump up the firebase costs, or maybe something worse like gets your database cleared.

    To help you with that I started writing things I learned in writing rules for firebase. I just published the first article on medium today. It is not behind the paywall as I want everyone to read it (okay, partly because I cannot monetize it from India).

    Feel free to read it out and suggest me improvements if you have any,

    https://kamaravichow.medium.com/role-based-access-in-firebase-firestore-firestore-rules-6d36cded1b15

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

    Android Emulator constants read and write to disk

    Posted: 08 Jun 2021 05:36 AM PDT

    Has anyone notice this, just fire it up and leave it there for half an hour an it write 90GiB to disk!!! Every dame time.

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

    "compileSdkVersion vs. targetSdkVersion - what's the difference?" - new video on my YouTube channel :)

    Posted: 08 Jun 2021 11:32 AM PDT

    Can/Should I get ride of ComposeView and Fragments?

    Posted: 08 Jun 2021 05:00 AM PDT

    I'm trying Jetpack Compose in a dummy projects. I've reached a point where all my Fragments xml layouts only consist of a ComposeView, and my single Activity layout only contain a FragmentContainerView and an AppBar, but I struggle to find what to do now.

    Can I get ride of the ComposeView and xml layout entirely without removing Fragments? (Which would force me to move to Jetpack Navigation if I understand it correctly)

    Should I actually remove Fragments and move to Jetpack Navigation? I've seen some people advocating against completely removing Fragments.

    Should I replace my LiveData with Flow? I see that LiveData are forced to be nullable and that add some boilerplate and bad error handling to my code ("if null -> display nothing"). Also seen this medium post that encourage me to go this way.

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

    How to opt-in to 15% cut below 1m in revenue on google play?

    Posted: 07 Jun 2021 05:17 PM PDT

    I remember hearing you had to opt in at the start of June, but can't find anything about it on the android developer blog. Is there a process?

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

    In-App Purchases Updates from Google I/O 2021

    Posted: 08 Jun 2021 08:27 AM PDT

    Navigating in Jetpack Compose

    Posted: 07 Jun 2021 01:01 PM PDT

    Android Studio 2020.1.1 Bumblebee Canary 2 Released

    Posted: 07 Jun 2021 06:32 PM PDT

    There doesn't appear to be a blog post about it yet, but my IDE just got the update.

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

    Lookng for app devs needing beta-testers..

    Posted: 07 Jun 2021 01:53 PM PDT

    Anyone here have an app that needs testing?

    Won't get into details here, but my company is doing a sponsored "QA Blitz" type thing, and the developers we WERE going to have folks crash-beta-test bowed out due to scheduling conflicts.

    Send me a message if you're interested. Event is June 24th, so only a couple weeks away. Won't cost you a thing, and get good feedback in return. And, makes my event planner not look completely unprepared. :D

    Edit to add:

    My employer makes project management/testing software, and some of our team often do community or college outreaches, where folks that are professional, student, or freelance QA beta testers get to experience black-box testing under a time limit for small prizes and recognition. Like mentioned above, usually the team that handles this has an agreement with a contracting company that does Android/iOS work, and they offer an app that they're beta'ing for the participants to go over and try to destroy. This event, they apparently have nothing to test, and our planners didn't find out until today. They know I do some free-lance android work, and asked if I knew anyone. Hence, the pose here.

    Essentially, my coworkers are looking for a dev (single, team, company) to provide beta access to an app. This app will be used by 10-20 testers during this one-evening event, in which they will black-box test the app. Any issues they find - or THINK they find - will be entered into one of my company's software suites. As the developer(s), you'll have access to this to review everything found as / for feedback on the app. No cost to you, and some free advertising to the folks that attend this.

    Mods - realize that this was only my second post here, but finding the subreddit is what made me post my other post, and figured this wouldn't hurt. Technically it's not advertising an app, but.. well, would be considered 'hunting for business', I guess. If it violates anything feel free to nuke the post; no harm intended!

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

    News app for Android Developers

    Posted: 07 Jun 2021 11:35 PM PDT

    I have always wanted to build a open source project that is useful for me and other people. At the same time, I wanted to learn new things that have been happening in Android Development Ecosystem. So, instead of using third party apis to build a sample app, I chose to build this news app that helps me learn things from various sources.

    It basically scrapes or uses rss feed to fetch content from different sources and saves it locally in the database. It is an offline app.

    Let me know what other data sources I should add:

    https://github.com/DroidNinja/DevUpdates

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

    No comments:

    Post a Comment