Android Question permission problem

3394509365

Active Member
Licensed User
Longtime User
i have this code:

i call this routine


B4X:
       Sub PermessoCartellaFoto
Dim rp As RuntimePermissions

rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)

'rp.Check(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)

Wait For Activity_PermissionResult (permission As String, Result As Boolean)

If Result Then

CC.Initialize("CC")

Else
ToastMessageShow("No permission!!!", True)
Return
End If

End Sub

in the process globals:

B4X:
Private CC As ContentChooser 'Phone Library


in the manifest code i put this :

B4X:
       AddManifestText(
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="19" />
)


but it doesn't work, it doesn't ask me for permission.
I have android 8.0
 

Peter Simpson

Expert
Licensed User
Longtime User
Upvote 0

3394509365

Active Member
Licensed User
Longtime User
here's the mistake

B4X:
wrong
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
Right
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="28"/>


I used an old version of sdk
 
Upvote 0
Top