from the tutorial and some other forum answers i come up with:
in the manifest-editor
And:
Result always runs to the msgbox to the "no permission granted". The sql.Inatialize doesn't never done.
Whats really to do?
in the manifest-editor
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5"
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:targetSdkVersion="26"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme)
'End of default text.
B4X:
Sub Activity_Create(FirstTime As Boolean)
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result = False Then
MsgboxAsync("No permission granted", "")
Return
Else
sql.Initialize(rp.GetSafeDirDefaultExternal("HomeBase.db"),"HomeBase.db",True) 'call this sub
'some other SQL, but it doesn't come here
End If
End Sub
Whats really to do?