This is my first post,Thank you for your help.
When the app is about to run,
it will crash because there is no storage permission
in the main
in the starter.bas
When the app is about to run,
it will crash because there is no storage permission
in the main
B4X:
Sub Activity_Create(FirstTime As Boolean)
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result = False Then
ToastMessageShow("..........", True )
Sleep(1000)
ExitApplication
End If
...........
End Sub
in the starter.bas
B4X:
Sub Service_Create
Dim dir As String
dir = File.DirDefaultExternal
If Not (File.Exists( dir, "sd.db") ) Then
File.Copy(File.DirAssets, "sd.jpg", dir, "sd.db" )
End If
SQL1.Initialize( dir, "sd.db", True)
End sub
Last edited: