Hello,
I wrote an app 8 years ago or so that's still in use here.
We got new phones with android 14 on it.
Unlike previous versions of the OS where I just got a message telling me the app is for an older version I could just ignore the warning and install and use it.
With this new OS version I got a lot of errors which I could bypass with the request permissing library (it's the first time I'm using it).
But I have the impression I'm doing something wrong as data written to file.dirinternal doesn't seem to get updated.
The file exists but always returns the old data after writing to it.
I also see a lot of sending message to waiting queue (activity_permissionresult) events in the log.
But nothing appears on the screen.
So I wonder how the permission library is supposed to be used when just reading from and writing to file.dirInternal.
Do I need to put the check in front of every load/save or only once at the beginning of the app?
I currently used this:
I wrote an app 8 years ago or so that's still in use here.
We got new phones with android 14 on it.
Unlike previous versions of the OS where I just got a message telling me the app is for an older version I could just ignore the warning and install and use it.
With this new OS version I got a lot of errors which I could bypass with the request permissing library (it's the first time I'm using it).
But I have the impression I'm doing something wrong as data written to file.dirinternal doesn't seem to get updated.
The file exists but always returns the old data after writing to it.
I also see a lot of sending message to waiting queue (activity_permissionresult) events in the log.
But nothing appears on the screen.
So I wonder how the permission library is supposed to be used when just reading from and writing to file.dirInternal.
Do I need to put the check in front of every load/save or only once at the beginning of the app?
I currently used this:
B4X:
If File.Exists(File.DirInternal,"settings") Then
Log("settings file exists")
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, result As Boolean)
If result Then
Log("success")
mSettings=File.ReadMap(File.DirInternal,"settings")
Log("loaded")
Else
Log ("no success")
End If
Else
Log("settings not found")
End If