Android Question App Abort Execution Library RuntimePermissions

ovasquez

Member
Licensed User
Longtime User
Good Nigth

I have the following problem (B4A 8.30):

My application aborts the execution when executing these statements in Release mode

If rp.Check (rp.PERMISSION_WRITE_EXTERNAL_STORAGE) = False Then
rp.CheckAndRequest (rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
End If
If rp.Check (rp.PERMISSION_READ_PHONE_STATE) Then
rp.CheckAndRequest (rp.PERMISSION_READ_PHONE_STATE)
End If

manifiest.
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="26"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)


In debug mode it works normally

Thanks for your Help.

Excuse mi english
 

Computersmith64

Well-Known Member
Licensed User
Longtime User

Is there any error in the logs when it crashes (also check unfiltered logs)?

You might want to review the runtime permissions tutorial (https://www.b4x.com/android/forum/threads/runtime-permissions-android-6-0-permissions.67689/).

There is this:

It doesn't say not to use Check, but it sounds like it might be easier not to.

- Colin
 
Upvote 0

ovasquez

Member
Licensed User
Longtime User
Thanks, I'm going to review the information you provided. I'm temporarily using targetSdkVersion = "22" and so it works correctly
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…