I have a pretty old app in B4A 5 that runs fine on older Android devices. I am trying to run it now an Android 11 and getting an error:
java.io.FileNotFoundException: /storage/emulated/0/Android/data/MyAppName/files/MyAppName.config: open failed: ENOENT (No such file or directory)
The code is:
The error occurs on File.WriteMap(ConfigFilePath, ConfigFileName, configMap)
I'm not sure if this is a permissions thing or maybe a version thing.
I have copied the old version and have compiled it in the latest version of B4A (12.50) but I still get the error.
java.io.FileNotFoundException: /storage/emulated/0/Android/data/MyAppName/files/MyAppName.config: open failed: ENOENT (No such file or directory)
The code is:
B4X:
Dim configMap As Map
configMap.Initialize
If File.Exists(ConfigFilePath, ConfigFileName) = False Then
configMap.Put("SQLUrl", SQLUrl)
File.WriteMap(ConfigFilePath, ConfigFileName, configMap)
Else
configMap = File.ReadMap(ConfigFilePath, ConfigFileName)
SQLUrl = configMap.Get("SQLUrl")
End If
The error occurs on File.WriteMap(ConfigFilePath, ConfigFileName, configMap)
I'm not sure if this is a permissions thing or maybe a version thing.
I have copied the old version and have compiled it in the latest version of B4A (12.50) but I still get the error.