Android Question Error with Notifications permission with targetSdkVersion = 33

Mehrzad238

Member
I used this code for permission

Notifications permission with targetSdkVersion = 33
and I faced with this error
B4X:
firspage$ResumeMessagerun (java line: 315)
java.lang.Exception: Sub activity_permissionresult was not found.
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:227)
    at anywheresoftware.b4a.BA$2.run(BA.java:395)
    at anywheresoftware.b4a.BA.setActivityPaused(BA.java:467)
    at ir.anishopmarket.app.firspage$ResumeMessage.run(firspage.java:315)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:211)
    at android.os.Looper.loop(Looper.java:300)
    at android.app.ActivityThread.main(ActivityThread.java:8294)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028)

When I Allow it for the first app gets shut down and then the next time runs ok

but when I'm not allowed it the app won't run and keep giving me that error

thanks
 
Solution
See this line: Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean) 'change to Activity_PermissionResult if non-B4XPages.

Especially the comment at the end.
Top