• Breaking News

    [Android][timeline][#f39c12]

    Wednesday, March 9, 2022

    Weekly Questions Thread - March 08, 2022 Android Dev

    Weekly Questions Thread - March 08, 2022 Android Dev


    Weekly Questions Thread - March 08, 2022

    Posted: 08 Mar 2022 06:00 AM PST

    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]

    Freeing up 60% of storage for apps

    Posted: 08 Mar 2022 06:18 PM PST

    30 ideas to improve your Gradle build times

    Posted: 09 Mar 2022 04:19 AM PST

    Using work manager instead of handler for periodic background work?

    Posted: 09 Mar 2022 12:31 AM PST

    Currently, I use a handler to do periodic background work. I use a round-robin approach where, for example, if I have 5 tasks that need to be done repeatedly I start with task 1 and when that finishes, I call postDelayed on the runnable object for task 2 and so on. When I arrive at task 5, I call postDelayed on the runnable for task 1, and the cycle repeats.

    This seems to be working fine but I recently came across Work Manager and I think it is exactly what I am looking for and it makes my life easier by taking care of scheduling tasks for me. However, I read in the documentation that Work Manager should be used to schedule persistent work that takes place in the background whether my app is open or close. In my case, my background cyclic work is tied to an activity and all of it must stop when I exit it.

    What is the opinion of you guys? Is work manager appropriate for my use case? Just to give you an idea about the type of work I currently perform using a handler: getting the user's location and finding it out which place (stored in our database) is closest, removing places that are too far from the user or close enough, etc.

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

    Migrating from Phonegap. Need to make a simple update.

    Posted: 09 Mar 2022 05:32 AM PST

    A few years ago, I was asked to develop an Android & iOS App (as a web developer) with no App development experience for the company I work for (I'm the only coder).

    I created the App in Phonegap, and it's worked great ever since. Haven't had the need to make any updates in 2-3 years, and the app still does the trick.

    However, now we have the urgent need to remove some basic text/image that is on our homes creen (a two second update normally). But now that Phonegap is gone, that seems difficult.

    My question is what is the easiest possible way to make a simple update like this, changing nothing else but a bit of text.

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

    Basic application with Jetpack compose vs flutter

    Posted: 08 Mar 2022 07:35 AM PST

    If you were to write a basic application that can be easily written in flutter, what will you choose between flutter and android jetpack compose.

    The things to consider on your answer are:

    • You have good knowledge for building apps with both flutter and android jetpack compose
    • The development time
    • Your main target is Android
    • The easiest way to develop the app

    Note: I am a flutter and react.js developer, most of my clients have basic android app requirements. The reason I learned flutter over native android, is because at the time, xml for android was harder to learn than flutter for me, but now with the stable release of jetpack compose, I'm considering learning it. I appreciate your thoughts

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

    Firebase error

    Posted: 09 Mar 2022 12:20 AM PST

    I'm try to store data in firebase real time database ,but I'm getting the error "Please ensure that you spelled the name of your Firebase correctly" what should I do

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

    Is it possible to make a paid app free for longer than 8 days?

    Posted: 09 Mar 2022 12:19 AM PST

    I would like to make my app free in the Ukraine, but I cannot find a setting in the Play Store, that fits my use case. I want to make the purchase as hassle-free as possible, to prevent any barriers for the user. Therefore I am a bit disappointed that I cannot simply lower the price to 0€, only to 0,06€ (which would still require the user to set up payment options etc.)

    I have found this documentation:

    https://support.google.com/googleplay/android-developer/answer/6334373?hl=en#:~:text=Create%20a%20sale%20or%20promotion

    But the "sale" option only makes the app free for a couple of days, and the "promotion" option is not country-specific

    Is there a way to resolve this, and simply set the price to 0€?

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

    MANAGE_EXTERNAL_STORAGE approval process on Google Play

    Posted: 08 Mar 2022 10:57 PM PST

    Has anybody gone through Google Play's process for allowing apps to use this special permission?

    Working on a media file manager, so seems like the app fits into the guideline but wander if anybody has actually gotten approval to use this permission and what that process looks like (and any advice / gotchas)

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

    Migrating old activity based app to fragments?

    Posted: 08 Mar 2022 10:25 PM PST

    Im working with an oldschool style android app in Java where every screen is an activity that are huge. Fortunately very clear separation between model and view, but the UI/view controller logic needs to be refactored.

    What is a sane way to refactor this? Are fragments what I should aim to move to? Were there any new Android recommended option for managing UI components?

    (Want to stay away from third party framework since a lot of the UI is complex)

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

    Intro Showcase View - Open source library to highlight different features of the app built using Jetpack Compose.

    Posted: 08 Mar 2022 05:22 AM PST

    Hi everyone! We recently published this open-source library. Please share your feedback and valuable suggestions.

    Is there anything we can do to improve its usability or accessibility?

    https://github.com/canopas/Intro-showcase-view

    Here's the article for those who are curious about implementation.

    https://blog.canopas.com/intro-showcase-view-in-jetpack-compose-ac044cd3bf28

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

    Easy way to show recycler view content for designing purposes?

    Posted: 08 Mar 2022 08:22 PM PST

    Mostly developers are required to show design & screen flow of app right, but to show sample contents in recycler view I have to create adapter, model & add dummy content in code unlike other views which display data we simply put in XML. Is there any easy way for the same?

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

    Passing data via CompositionLocal

    Posted: 08 Mar 2022 08:19 PM PST

    As an android developer who's starting out, how does this code look?

    Posted: 08 Mar 2022 03:21 AM PST

    Hello r/androiddev,

    I've been making small, self-contained apps for android for some time now. I don't consider myself to be a pro or even a good programmer. Irrespective of that, I make open-source, minimalist software inspired by communities like r/suckless.

    I've been working on a Gopher protocol for about a month now. I would really appreciate it if I got some advice/tips on what i can do better, what I'm doing wrong, etc.

    Another thing that I noticed is that my client is slow in rendering pages compared to other clients. I would really appreciate it if someone could let me know why that's the case. Is it because I'm first checking for content type and then loading the page ? I did it this way assuming that this is how it's generally done.

    link to the app repo.

    Thank You.

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

    Wha development tools has your company created that help improve your android development process?

    Posted: 08 Mar 2022 07:20 AM PST

    For example, in a previous workplace, they've created an sdk that helped testers do their job faster by allowing them to do various actions in the app like: crashing the app, switching between flavour, triggering certain notifications.

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

    Android Notification HowTo

    Posted: 08 Mar 2022 05:15 PM PST

    An open source compositional deadlock detector for Android Java

    Posted: 08 Mar 2022 10:03 AM PST

    Using custom backend

    Posted: 08 Mar 2022 06:21 AM PST

    Hi guys,

    do you recommend creating own backend for relatively simple app ?

    Description of the app: - it'd cookbook, where you can find recipes by ingredients. - users might be able to comment, post recipes, store favorite recipes, scroll through recent/most liked recipes etc. - ....

    I have created rest api similar to this before in django. I would like to know if it is better to use firebase, aws or it is fine using own backend.

    Thank you

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

    Anyone experiencing long review times?

    Posted: 08 Mar 2022 07:23 AM PST

    I've had apps on the Play Store for years and have never gone through any lengthy review process. They've pretty much been published when I submit them. Lately updates have been sitting in the "review" state for days. Not only that, some updates are being rejected for random reasons.

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

    Compose destination for those who were hurt by compose navigation

    Posted: 08 Mar 2022 09:28 AM PST

    https://github.com/raamcosta/compose-destinations

    Example with bottomsheets: ```koltin //Activity val navController = rememberAnimatedNavController() val bottomSheetNavigator = rememberBottomSheetNavigator() navController.navigatorProvider += bottomSheetNavigator ModalBottomSheetLayout( bottomSheetNavigator = bottomSheetNavigator ) { DestinationsNavHost( navController = navController, navGraph = NavGraphs.root, engine = rememberAnimatedNavHostEngine() ) } //Main screen @Destination(start = true) @Composable fun MainScreen(navigator: DestinationsNavigator){ ///// someOnClick{ navigator.navigate(CreateScreenDestination) } } //Other screen @Destination @Composable fun CreateScreen( navigator: DestinationsNavigator, propertyResultRecipient: ResultRecipient<PropertyBottomSheetDestination, Properties> ){ var properties by remember { mutableStateOf(Properties.default()) }
    propertyResultRecipient.onResult { newProperties -> properties = newProperties } }

    @Destination(style = DestinationStyle.BottomSheet::class) @Composable fun PropertyBottomSheet( resultNavigator: ResultBackNavigator<Properties> ) { onNewPropertiesSet{ resultNavigator.navigateBack(result = it) } } ```

    But compose animation(used in bottomsheet etc.) is still not stable So those optin annotation will be there

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

    cat controls dont work

    Posted: 08 Mar 2022 03:01 PM PST

    i wanted the cat controls but they dont work while doing the thing with circle there sre no the cat emoji and nothing happens i have oppo a74 11 android

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

    Update Play Store version by released apk

    Posted: 08 Mar 2022 08:53 AM PST

    I would like to check if it's possible to update an app installed from Google Play store with a released apk file ? The store version was uploaded as Android App Bundle. Currently, my app is not available in store now so if I give my users the apk file, will they be able to update the existing version or they need to uninstall the old one first ? Thank you.

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

    Android app configuration class

    Posted: 08 Mar 2022 04:21 AM PST

    If you need a type safe configuration object in your app that doesn't require any runtime file parsing, check this out: https://github.com/pstanoev/android-mojoconfig

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

    Android Services Quiz

    Posted: 08 Mar 2022 09:26 AM PST

    #mobchallenges #androiddevelopment #challenge

    Do you know Android Services well, so try this quick quiz and evaluate yourself? I am going to provide more challenges and quizzes if I found you interested. Give it a try and be honest, do not use Google.https://forms.gle/3iJRGCPXYgEjwHXy9

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

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel