r/android_devs • • Feb 14 '22

Help Targeting S+ version requires FLAG_IMMUTABLE

10 Upvotes

Hi everyone,

I've built a weather app and it's been up for about a year now when suddenly I started getting emails from various users that the app crashes on startup. After taking a look at the crashlytics logs, here's the trace I was provided with:

Fatal Exception: java.lang.IllegalArgumentException: com.nesoinode.flogaweather: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
       at android.app.PendingIntent.checkFlags(PendingIntent.java:382)
       at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:673)
       at android.app.PendingIntent.getBroadcast(PendingIntent.java:660)
       at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:174)
       at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:108)
       at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:86)
       at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:75)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:920)

I can't see any classes of mine being referenced here and I searched through my project but couldn't find any pending intents either. I don't currently use any broadcast receivers or widgets in my app but I do have declared in my manifest a WidgetProvider (which is a broadcast receiver) but that shouldn't matter since it's commented out in the production version, correct?

Anyone have any ideas on how to go about tracing this?

P.S. Crashlytics is showing me that all the crashes are caused on Samsung devices.


r/android_devs • • Dec 20 '21

Coding Yesterday we had the last episode of the year! ❄️🎄 With Mark, we created a custom #JetpackCompose modifier to add a snow effect to our Composables.

Thumbnail
youtu.be
10 Upvotes

r/android_devs • • Nov 22 '21

Coding Finally, I've found a valid use for "android:process" attribute for the activity - I've made a small library to trigger "safe mode" for application that experiences repeated crashes on startup

Thumbnail
github.com
10 Upvotes

r/android_devs • • Aug 30 '21

Resources A Collection of 70+ Jetpack Compose Tutorials for Beginners, Intermediate and Experienced Android Developers

Thumbnail
theinsaneapp.com
10 Upvotes

r/android_devs • • May 29 '21

Event Android Worldwide Call for Papers (Closes on June 15th)

Thumbnail
sessionize.com
10 Upvotes

r/android_devs • • Apr 26 '21

Help Broad Storage Access Deadline 5th May and WRITE_EXTERNAL_STORAGE

10 Upvotes

Hi, we got warning on most of our apps about Broad Storage Access Deadline which ends on 5th May, our apps target api 10(29) and we don't have MANAGE_EXTERNAL_STORAGE permission declared in our manifest(s). So we are confused, will requestLegacyExternalStorage work or cause apps to crash? Will apps be removed if they have WRITE_EXTERNAL_STORAGE and are not targeting Android 11(30)?
The message we got from Google is a confusing, If we are not targeting api30 and dont have MANAGE_EXTERNAL_STORAGE, why did we even get the message?


r/android_devs • • Apr 20 '21

Event Android Worldwide April Event - April 27th, 2021

10 Upvotes

Event link: https://www.airmeet.com/e/3a42a900-9868-11eb-bfbb-3361cd1b2fd8

Android Worldwide is having yet another series of global online meetups - attendance, as usual, is free!

The complete list of talks is the following (CEST, GMT+2 timezone):

April 27th:

  • 2:30 PM - Socialize / chat (ended)

  • 3:15 PM - Making rules with Lint by Honey Sonwani (ended)

  • 4:05 PM - Android App Bundle: from start to deployment by Julien Salvi (ended)

Then

  • 6:30 PM - Socialize / chat (ended)

  • 7:15 PM - Jetpack Compose for Games & Animations by Wajahat Karim (ended)

  • 8:05 PM: Mastering API Visibility in Kotlin by Márton Braun (ended)

Then

  • 0:45 AM - Socialize/chat (ended)

  • 1:30 AM - Kotlin goes global by Karan Dhillon (ended)

Then

  • 3:00 AM - Socialize/chat (ended)

  • 3:45 AM - Unit Testing Kotlin Channels & Flows by Mohit Sarveiya (ended)

  • 4:35 AM - Preview Driven Development by Rikin Marfatia (ended)

The event will be hosted on Airmeet.

Agenda is from: http://androidbudapest.com/2021-april

Extended agenda is at: https://gdg.community.dev/events/details/google-gdg-los-angeles-android-presents-android-worldwide-april-2021/


r/android_devs • • Apr 09 '21

Coding Retry Policy with Exponential Backoff with Kotlin and Flow

Thumbnail
valueof.io
10 Upvotes

r/android_devs • • Apr 05 '21

Coding Is sending data between fragments preferable over sharing this data in an activity-scoped shared ViewModel?

10 Upvotes

When you need to send data between fragments, do you send them as fragments args (and backwards using the fragment result API) or do you share this data over an activity-scoped ViewModel? And why prefer one over the other?


r/android_devs • • Mar 25 '21

Coding Prime Table Generator in Jetpack Compose

Thumbnail
medium.com
10 Upvotes

r/android_devs • • Mar 24 '21

Off topic Reddit’s most popular subreddits go private in protest against ‘censorship’

Thumbnail
gamerevolution.com
10 Upvotes

r/android_devs • • Feb 18 '21

Event Exploring Advanced Jetpack Compose Features - Droidcon Webinar (2021-02-18, 17:00 CET)

Thumbnail
online.droidcon.com
10 Upvotes

r/android_devs • • Jan 25 '21

Coding Creating a BottomNavigation Multi-Stack using child Fragments with Simple-Stack

Thumbnail
medium.com
10 Upvotes

r/android_devs • • Nov 29 '20

Coding Goal App Motion Layout Android Studio 2020

Thumbnail
youtu.be
10 Upvotes

r/android_devs • • Nov 04 '20

Coding Mastering API Visibility in Kotlin - zsmb.co

Thumbnail zsmb.co
10 Upvotes

r/android_devs • • Sep 13 '20

Coding 6 — 12 September Android Newsletter

10 Upvotes

Stay up to date with Android development, in this week's edition:
🏗️ Prepare your app for Android 11
🧪 Try Jetpack Compose
💾 Explore Proto DataStore
🔑 Secure your app with modern tools

and much more!

🔥 Featuring @suspendfunction @imShreyasPatil @deniskrrr @SumargoErick @appedus @AnupAmmanavar @elye_project

💚 Enjoy https://vladsonkin.com/android-newsletter-11/


r/android_devs • • Sep 03 '20

Event Android Worldwide's next event is live <3 (September 22nd)

Thumbnail
eventbrite.ca
10 Upvotes

r/android_devs • • Sep 01 '20

Off topic Understanding the Android APK build process, the execution environment, and code compilation.

Thumbnail
youtube.com
10 Upvotes

r/android_devs • • Aug 25 '20

Publishing Reminder: Update your Android targetSdkVersion by Nov 2, 2020

10 Upvotes

Updates to apps and games on Google Play will be required to target Android 10 (API level 29) or higher. After this date, the Play Console will prevent you from submitting new app bundles and APKs with a targetSdkVersion less than 29. Please note that Wear OS apps are not subject to the API level 29 requirement. This will not impact your existing listing on the Play Store.


r/android_devs • • Aug 22 '20

Coding A tool for when you are just done with crap on a Friday...

10 Upvotes

https://github.com/pablobaxter/frybits-wtf

NOTE: I don't recommend anyone use this library in production, but if you do, keep us all posted!


r/android_devs • • Aug 05 '20

Fifty shades of Coding Mystery of the Jetpack SavedStateHandle: solved

Post image
10 Upvotes

r/android_devs • • Jul 24 '20

Discussion AdMob account permanently disabled and banned for life for no reason

10 Upvotes

My AdSense/AdMob account has been permanently disabled and banned for life, no warnings before, nothing, just a sudden account termination after I published a new version of my app (the app is a utility) where I display a small banner ad on the News screen/page of the app where there is a WebView (a simple static text web page is loaded from my server) where I let people know of new features. There was enough spacing beween the ad and the WebView so it wasn't that, the reason was (the email came from AdSense which I found a bit weird, I never used AdSense, all I know is that the accounts are connected): "Valuable Inventory: Framed Sites". So basically the system thought that the web page from my News screen does not belong to me and that I make money off other people's content but I had this website added into my Play Store under Developer website. I tried to appeal explaining to them that I own all the content and all I got back was an automated response that they cannot reinstate my account and that the decision is final. So that was my only appeal to get my account back but it doesn't seem like anyone even bothered to read it. All the money from my account is gone too.

Has anyone ever got their AdSense/AdMob account back eventually? I know that I did nothing wrong, I never clicked on my own ads/caused any invalid activity (I have used AdMob for a year without any problems), I read their policy pages over and over again and also posted this question in the AdMob SDK forum and the developers from Google also did not find anything wrong or suspicious about my app, so even they don't have any idea why I was banned, but they are not able to help me with my account as they have no access to that at all.

Is there anything else that I can do at this point? I can't even use any other ad platforms like MoPub, got rejected because my app is flagged by AdMob for breaking the policy.

On their policy page it says: "Google AdMob and AdX in-app ads may be shown in an app next to a WebView so long as the Google Mobile Ads SDK is in use and the publisher is compliant with all other AdSense program policies."

https://support.google.com/admob/answer/48182?hl=en#:~:text=Google%20AdMob%20and%20AdX%20in,all%20other%20AdSense%20program%20policies.

And this:

"Displaying a third party site in your app

When an app displays someone else's site within a frame, this is considered framing content. Publishers are not permitted to frame third party content and monetize it without permission from the owners of that content."

Thanks!


r/android_devs • • Jul 18 '20

Coding Android Fragment Lifecycle in 137 Seconds

10 Upvotes

Android Fragment Lifecycle is complicated, and official documentation is even worse. But don’t panic, there is an easy way to understand and use it correctly. It’ll take you 137 seconds (faster than Gradle build :P), start your timer.

https://vladsonkin.com/android-fragment-lifecycle-in-137-seconds/


r/android_devs • • Jul 10 '20

Discussion Android team AMA - The day after

10 Upvotes

There are a couple of articles in androidpolice related with this AMA:

Phone makers are breaking your favorite apps with reckless changes to Android's power optimization features

Google's response to Android apps getting delayed or killed in the background leaves a lot to be desired

If you have asked something and had an answer you can write the question / answer below.