Android Question Android10 and API29

FerGeoRi

Active Member
Licensed User
Longtime User
Hello

I made a small application that reads and writes text files.

In Manifesto: <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>.

This no longer wants to work on Android10.

Could someone please tell me what the solution is to solve this problem?

Thank you very much for your answer.

I look forward to hearing from you.

FerGeoRi
 
Hello
Thank you for your prompt response.

Text files in File.DirDefaultExternal and RnTime permission is ok.

Following your advice I have been reading the site https://www.b4x.com/android/forum/threads/targetsdkversion-28-android-9-0.104501/#content.
But I'm in trouble because of my poor knowledge of the English language. (I am French)

I made the following tests:
- Text files in File.DirDefaultExternal: does not work.
- Text files in File.DirRootExternal: does not work.
- Text files in File.DirInternal: works but I can't see the files.
- Text files in File.DirInternalCache : works but I can't see the files.
Sincerely
FerGeoRi

Translated with www.DeepL.com/Translator (free version)
 
Upvote 0
android.jar / targetSdkVersion / minSdkVersion | B4X Programming Forum
- 29 - No permission to access File.DirRootExternal, even with the STORAGE permission. For now there is a simple workaround:
B4X:
Set in the manifest editor.
SetApplicationAttribute(android:requestLegacyExternalStorage, true)
It will not work with targetSdkVersion=30. Avoid using File.DirRootExternal. Either use File.DirInternal or RuntimePermissions.GetSafeDirDefaultExternal.
 
Upvote 0
Good evening.
It's ok, my application works fine on Android10.
With :
- <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>
- SertApplicationAttribute(android:requestLegacyExternalStorage, True)
- android-29\android.jar
Many thanks to mcqueccu and agraham for your help.
Cordially
FerGeoRi
 
Upvote 0
Back
Top