-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue PendingIntent.FLAG_IMMUTABLE app crashed on Android app Target 31 (Android 12) #308
Comments
We are in the process of updating android to 31 and we ran into this also. Reading the readme for the android-upload-service library I noticed a warning that says that in 31 you can't start uploads while your app is in the background. Do you have any experience dealing with this b/c it seems like its breaks the Android side of this library.
It doesn't seem like android-upload-service has not plans to make background uploads work for 31 and up either |
My NotificationActions class is different than yours here is the content of my file `package com.vydia.RNUploader import android.app.PendingIntent class NotificationActions { val PARAM_ACTION = "action" val ACTION_CANCEL_UPLOAD = "cancelUpload" fun getCancelUploadAction(context: Context?, How should I edit the return line, I tried your solution but its throwing some errors. |
Hello, we have been having this issue on Android app Target 31.
Ref document: https://stackoverflow.com/questions/67045607/how-to-resolve-missing-pendingintent-mutability-flag-lint-warning-in-android-a
I tried with solution add dependency into build.gradle
implementation 'androidx.work:work-runtime:2.7.1'
But it still does not work.
-> My latest solution to fix this which is using patch package to modify Native code
Change
return PendingIntent.getBroadcast(context, requestCode, intent, flag)
toI think we should create PR for this. Thanks.
The text was updated successfully, but these errors were encountered: