Must be my day for weird crap...
I have the following sub that checks whether an options file exists, then if it doesn't (so it's a new install) it does one thing & if it does (it's an update) it does something else.
I have used this sub in virtually every app I've written & it has worked fine, however today I came across a strange behavior on a device running Android 8.1...
If I uninstall the app from the device (including for all users), then reinstall it from B4A, the first time it runs File.Exists returns true - & the version data in the options file shows the previously installed version (proving that the file is actually there). If I then completely kill the app, then run it again, File.Exists returns false!
I don't understand. Is there something weird with Android 8.1 where the app isn't fully uninstalled?
- Colin.
I have the following sub that checks whether an options file exists, then if it doesn't (so it's a new install) it does one thing & if it does (it's an update) it does something else.
B4X:
Public Sub Read_Options() As Boolean
If File.Exists(File.DirInternal, "options.dat") Then
mOptions = File.ReadMap2(File.DirInternal, "options.dat", mOptions)
Return True
Else
Return False
End If
End Sub
I have used this sub in virtually every app I've written & it has worked fine, however today I came across a strange behavior on a device running Android 8.1...
If I uninstall the app from the device (including for all users), then reinstall it from B4A, the first time it runs File.Exists returns true - & the version data in the options file shows the previously installed version (proving that the file is actually there). If I then completely kill the app, then run it again, File.Exists returns false!
I don't understand. Is there something weird with Android 8.1 where the app isn't fully uninstalled?
- Colin.