• Breaking News

    Saturday, July 31, 2021

    Android Dev - App Feedback Thread - July 31, 2021

    Android Dev - App Feedback Thread - July 31, 2021


    App Feedback Thread - July 31, 2021

    Posted: 31 Jul 2021 06:00 AM PDT

    This thread is for getting feedback on your own apps.

    Developers:

    • must provide feedback for others
    • must include Play Store, GitHub, or BitBucket link
    • must make a top level comment
    • must make an effort to respond to questions and feedback from commenters
    • app may be open or closed source

    Commenters:

    • must give constructive feedback in replies to top level comments
    • must not include links to other apps

    To cut down on spam, accounts who are too young or do not have enough karma to post will be removed. Please make an effort to contribute to the community before asking for feedback.

    As always, the mod team is only a small group of people, and we rely on the readers to help us maintain this subreddit. Please report any rule breakers. Thank you.

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

    This is why your subclassed Application isn't always instantiated

    Posted: 30 Jul 2021 10:05 PM PDT

    This is why your subclassed Application isn't always instantiated

    A little over a year ago, I ran into a weird problem and I didn't understand what was happening. I had a service that was casting the application object from Service.getApplication() to my subclassed Application class (let's call it MyApp). However, I was seeing a crash caused by a ClassCastException because the object from Service.getApplication() could not be cast to MyApp. The user impact was low, but the volume was incredible (thousands of crashes per user). What was weird was that this crash was not appearing in Crashlytics, metrics showed nothing weird, and an investigation in the code showed that MyApp was setup properly in the manifest. However, Google Play Console was showing that this was a problem, and user reviews were mentioning constant crashing. So I did a quick sanity check, and obviously MyApp had to initialize before the app got to any of the services I had... So what was happening?

    This one tag in the Android manifest:

    <application android:allowBackup=true /> 

    How was that tag causing this crash? The following image comes from the Android AutoBackup documentation (https://developer.android.com/guide/topics/data/autobackup#ImplementingBackupAgent)

    https://preview.redd.it/8pzzxunt8he71.png?width=1756&format=png&auto=webp&s=c4ea8d3d4039575d2bb75367737bda4f4db2b679

    So when Android enters this "Restricted" mode, basically the app is not running anything, which is understandable, as you don't want to modify data stored on the device while the app data is being backed up. So I did some testing and discovered something interesting: BroadcastReceivers and Services can still be started while this backup is in progress. Shit.

    So that's pretty bad... anything that would normally start your app from external sources (Alarms, Jobs, FCM, etc) would still trigger while in this "Restricted" mode. That explains one, maybe two crashes per user, by why thousands of crashes per user?

    Well, after more testing, some deep digging in the AOSP, beers to help numb the despair, and possibly some crying under my desk, I discovered that when an app crashes while in this "Restricted" mode, the next app start, regardless of how it is started (user initiated, intent, etc), restarted back in this "Restricted" mode. Any ContentProviders or library initialization in MyApp did not run. The app started up in a broken state. Naturally, the app crashed because of this. Now, because the app was still in the "Restricted" mode when it crashed, that meant the next app start was going to be in this "Restricted" mode again, and thus, we had a vicious cycle of crashes.

    How was this fixed?

    <application android:allowBackup=false /> 

    I just disabled the backup, and like magic, the crashes went away.

    I hope that my story helps any other poor soul who is dealing with this maddening issue. If you happen to be dealing with it, know that I have file a bug ticket with Google over a year ago: https://issuetracker.google.com/issues/160946170

    Edit:

    TL;DR - The android:allowBackup=true tag can lead to a broken app state that can cause constant app crashes. If you are seeing ClassCastException crashes because of you casting the result of getApplication() to your subclass application, you probably should disable allowBackup.

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

    A Vocabulary of Jetpack Compose Terms

    Posted: 31 Jul 2021 06:22 AM PDT

    July 28 Policy: You can't request location permissions for the sole purpose of advertising or analytics.

    Posted: 31 Jul 2021 02:36 AM PDT

    You should never request location permissions from users for the sole purpose of advertising or analytics. Apps that extend permitted usage of this data for serving advertising must be in compliance with our Ads Policy.

    Source: https://support.google.com/googleplay/android-developer/answer/10808976

    I'm not sure what to make of it. It seems like we can't ask for this type of data if the only point of it is advertisement or analytics. I'm pretty much sure personalized ads do access users' location to display more accurate ads.

    Then there's this second part that states it's ok to access it to display ads as long as they comply with the ad policy.

    Edit: Here's more info:

    Use of Location Data for Ads

    Apps that extend usage of permission based device location data for serving ads are subject to the Personal and Sensitive Information policy, and must also comply with the following requirements:

    Use or collection of permission based device location data for advertising purposes must be clear to the user and documented in the app's mandatory privacy policy, including linking to any relevant ad network privacy policies addressing location data use.

    In accordance with Location Permissions requirements, location permissions may only be requested to implement current features or services within your app, and may not request device location permissions solely for the use of ads.

    My admob plugin requires ACCESS_FINE_LOCATION. Has anyone uploaded or updated an app with ads and this permission recently? How did it go?

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

    Two Api requests with paging library

    Posted: 31 Jul 2021 06:18 AM PDT

    Hey everyone,

    I'm currently writing an app that displays a list of movies. I want the main fragment to display the list of trending movies with the user being able to search for movies. However, I'm struggling to handle two api requests.

    The code is in the link. Any help is greatly appreciated.

    Thank you

    https://stackoverflow.com/q/68600617/16511596

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

    Handling fake IAP - Android billing library 3

    Posted: 31 Jul 2021 02:46 AM PDT

    Hi

    I've Implemented In App purchase in my Android App Starting with billing library 3 it was new released at the time so I didn't think to do any purchase verification from my side. I just relied on it.

    However, I've noticed a lot of fake purchases and someone actually did a YouTube video on my app mentioning that he did a fake purchase.

    I know there is a lot of threads about this matter but I didn't see any new ones so I think maybe there is something new about it.

    - Do you guys think I should do my sever side verification every time after querySkuDetails response ? . if yes. is there any negative impacts on the users who did a real purchase (Assuming the server verification is fine) ? or maybe this is not the right way to do it ? Please any idea on how you guys handling it.

    - IAP library 4 is available now. Did Google fix this ? I mean this BS should be taken care of by Google. They take the purchase percentage from us and not doing anything about this. For God sake I want to concentrate on improving my app not dealing with this.

    I need your experience guys

    Thanks in advance

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

    ConstraintLayout 2.1.0 & ConstraintLayout-compose 1.0 beta 2

    Posted: 30 Jul 2021 05:58 PM PDT

    Speedup your CI with BatchRunner

    Posted: 31 Jul 2021 01:52 AM PDT

    Here is a module that can bring parallelism to your unit tests(Android). Batch-Runner is a Junit4 plugin that uses Coroutines under the hood to spin off the maximum available threads while running the unit tests. This plugin also allows the developer to run the Test-Suits in parallel. Batch-Runner presently supports Mokito out of the box and exposes certain classes that help developers create custom Runner implementations that can leverage Batch-Runner's Parallel test running capability.

    https://github.com/iamjosephmj/BatchRunner

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

    Hands on with Jetpack's Security new App Authenticator Library

    Posted: 30 Jul 2021 11:52 PM PDT

    Wallpaper App's wallpaper

    Posted: 31 Jul 2021 04:59 AM PDT

    I am just curious and wanted to know, where do wallpaper apps get their wallpapers?
    Saw a couple of related questions in quora, with no answers.
    I am aware of few places like Unsplash where we can get images with a free license.

    But there are many popular & successful apps, with their own styles/categories of images and this is different for each app. Do those apps, have a separate team of third-party/external photographers who submit their photos?

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

    Does Google Admob ban your app ads based on your Youtube channel?

    Posted: 30 Jul 2021 04:45 PM PDT

    Hey,

    I have a brand youtube account linked to my email address i used to sign up to admobs and the channel is based on cybersecurity and ethical hacking (i don't have any ads on this youtube channel). My admob account was approved and i had ads running on an app but then now my account has been banned with the following:

    ...... Enables dishonest behaviour: We do not allow content that:

    helps users to mislead others.

    promotes any form of hacking or cracking and/or provides users with instructions or equipment that tampers with or provides unauthorised access to software, servers or websites. .....

    I only have ads running on my app, basically a Flappy Bird clone haha (I know).

    But the only thing i could think of is they looked at my cybersecurity channel and didn't like what they saw? I don't have any ads running on my youtube only the app. I'm just trying to figure out where i went wrong.

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

    What would be the modern implementation of expandablelistview?

    Posted: 30 Jul 2021 10:43 PM PDT

    Is there any? or is it still the most/best method out there?

    Thank you.

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

    Documentation issue

    Posted: 31 Jul 2021 02:23 AM PDT

    Hello dear android community,

    I'd like to ask where I can find out where I can check the compatability of my app, that I programmed for a class. I will send in the documentation today, and I am unsure how I can check the device compatability for the app. Can someone guide me here in this process ?

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

    Managing state with RxJava - Jake Whaton

    Posted: 30 Jul 2021 08:16 PM PDT

    https://youtu.be/0IKHxjkgop4

    Is this how tech companies write reactive UI? I have seen ton of RX code and familiar with patterns, but this video just spins my head around. If I were to conduct interviews to hire RXJava developer, I doubt much or any of them could write code this way. (Btw, any high school student can write the exact functionality with stupid/easy RX code or just imperative)

    Do I need to be writing RXJava at this level to be competent enough to work in the valley?

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

    How do you document your code?

    Posted: 30 Jul 2021 06:35 PM PDT

    Can you please share with me some of the ways you use to document your code especially you makes to the code.

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

    Google Universal App Campaigns. How much time/users does it take to accurately target user actions?

    Posted: 30 Jul 2021 11:52 AM PDT

    I'm having trouble getting a google ads universal app campaign to get me the amount of users who complete actions as I think it should.

    I'm targeting users using firebase analytics who keep and use the app for longer than 24 hours, based on my analytics that number is around 43% of users (close to half). And when I've done campaigns to just get any users in the past it cost around 80 cents per install. When I target the 24+ hr users and bid $3 it isn't able to get me that much for the price point, the avg ends up being about $8 to 12 per user who completes that action (even though it should be about $2 since its normally half of the users).

    I have a few hundred users who hit the event per day which is supposed to be more than the minimum for googles AI to figure it out. Anyone else have a similar problem and figure out how to fix it?

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

    No comments:

    Post a Comment