Android Question SQLiteCantOpenDatabaseException when initialising KVS with folder from GetSafeDirDefaultExternal

Derek Johnson

Active Member
Licensed User
Longtime User
I'm recently starting to see errors from a deployed application from just one user using a Motorola Moto G(4) (athene), Android 7.0.
The error is :


The KVS code is started in the Starter module

B4X:
Sub Process_Globals
....
    Dim KVS As KeyValueStore  'This is the first version v1.01
    Dim RP As RuntimePermissions
    Dim SafeFolder As String
    ...
End Sub
Sub Service_Create
    SafeFolder=RP.GetSafeDirDefaultExternal("")
    'Error occurs here:'
    KVS.Initialize(SafeFolder ,"kvs")
    ...
End Sub

This is from the Manifest:

B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="11" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
    
RemovePermission(android.permission.WRITE_EXTERNAL_STORAGE)

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

Can anyone suggest what might be causing this? Lack of space on the device possibly?

Derek
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…