OneSignal Notification Click Crashes App - ActivityNotFoundException

Viewed 24

I have an Ionic app that uses OneSignal to send notifications to users. I have updated my project to use Android 12 (API level 32), which also required an upgrade of Capacitor to version 4:

ext {
    minSdkVersion = 22
    compileSdkVersion = 32
    targetSdkVersion = 32
    androidxActivityVersion = '1.4.0'
    androidxAppCompatVersion = '1.4.2'
    androidxCoordinatorLayoutVersion = '1.2.0'
    androidxCoreVersion = '1.8.0'
    androidxFragmentVersion = '1.4.1'
    junitVersion = '4.13.2'
    androidxJunitVersion = '1.1.3'
    androidxEspressoCoreVersion = '3.4.0'
    cordovaAndroidVersion = '10.1.1'
    coreSplashScreenVersion = '1.0.0-rc01'
    androidxWebkitVersion = '1.4.0'
}

Since the update, the app crashes whenever a user clicks/taps on the notification. The error reported is as follows:

enter image description here

Stack trace:

enter image description here

capacitor.build.gradle:

enter image description here

Android.Manifest.xml

enter image description here

I have added the android:exported="true" activity attribute as specified by the Capacitor upgrade guide.

Please advise why the app might crash when clicking on notifications?

0 Answers
Related