Android 12 Flag_Immutable
Closed this issue · 5 comments
pateras95 commented
Trying to run your APK after build on Android 12 phone and we get this error :
Process: com.example.mypos, PID: 6417
java.lang.IllegalArgumentException: com.example.mypos: 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:375)
at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:651)
at android.app.PendingIntent.getBroadcast(PendingIntent.java:638)
at com.pax.gl.commhelper.impl.u.a(SourceFile:1344)
at com.pax.gl.commhelper.impl.u.connect(SourceFile:251)
at com.mypos.slavesdk.PaxUsbConnectionHandler$1.run(PaxUsbConnectionHandler.java:119)
at java.lang.Thread.run(Thread.java:920)
StiliyanKovachev commented
Hi,
are you using 2.1.0 myPOS sdk version?
pateras95 commented
Slave sdk for myPOS is on 2.0.9 version if i am correct and this is the myPOS sdk, i intrergrated from the tutorial
StiliyanKovachev commented
please update your dependency to implementation 'com.mypos:slavesdk:2.1.0'
StiliyanKovachev commented
@pateras95 sorry I've got your point. The fix will be available in the new version.
StiliyanKovachev commented
version 'com.mypos:slavesdk:2.1.2' is live now. Please update