Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo Plugins Support › NotificationManager on Android 12

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24801

    Carlos J Yu

    Hi Felgo Team,

    Recently we released an android application with Android build SDK android-32 which has reported crashing on Android 12 users in NotificationManager, possibly on OneSignal too. When application is on background and receive/schedule a notification, it crashes. I tried possible solution around the internet but the app still crashing. As I understood that we have to consider using FLAG_IMMUTABLE but I have no idea how fix this. Any solution for this error?

    W System.err: java.lang.IllegalArgumentException: com.isakayph.driver: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
    W System.err: 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.
    W System.err: 	at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
    W System.err: 	at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
    W System.err: 	at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
    W System.err: 	at net.vplay.plugins.notification.NotificationManagerItem.getPendingIntent(NotificationManagerItem.java:259)
    W System.err: 	at net.vplay.plugins.notification.NotificationManagerItem.scheduleNotification(NotificationManagerItem.java:98)
    W System.err: 	at org.qtproject.qt5.android.QtNative.startQtApplication(Native Method)
    W System.err: 	at org.qtproject.qt5.android.QtNative$7.run(QtNative.java:620)
    W System.err: 	at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61)
    W System.err: 	at java.lang.Thread.run(Thread.java:920)
    F : java_vm_ext.cc:579] JNI DETECTED ERROR IN APPLICATION: JNI GetMethodID called with pending exception java.lang.IllegalArgumentException: com.isakayph.driver: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
    F : java_vm_ext.cc:579] 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.

     

    Thank you in advance,

     

    #24802

    Günther
    Felgo Team

    Hi Carlos,

    Thank you for your message, we can reproduce the issue and are looking into it.

    I will let you know as soon as I have more information.

    Best,
    Günther

    #24804

    Carlos J Yu

    Hi Günther,

    This is acknowledged, we’ll be waiting for your feedback.

    Thank you,
    <h2></h2>

    #24813

    Günther
    Felgo Team

    Hi Carlos,

    we’ve investigated the problem and applied a fix for the Felgo Notification Plugin. The One Signal Plugin was not affected.

    The fix is already live and applied when rebuilding the application with the latest Android notification plugin, which is integrated via maven in the android/build.gradle:
    implementation 'net.vplay.plugins:plugin-notification:3.+'

    To ensure your Android build downloads and uses the latest version of the notification plugin, please clean the previous plugin from your local maven cache and make a fresh Android build. You can find the cache in the directory “C:\Users\Username\.gradle\caches\modules-2\files-2.1\net.vplay.plugins\plugin-notification” (or on macOS ~/.gradle/caches/files-2.1/net.vplay.plugins/plugin-notification)

    This is only required for local project builds. If you are building the application with Felgo Cloud Builds the correct version is used automatically.

    Let us know in case you encounter any more problems!

    Best,
    Günther

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded