Hello,
I have an application no-google running on Android 10 with minSdkVersion=29 and targetSdkVersion=29.
If I put targetSdkVersion = 30, it no longer works on the same Android 10 device.
Why ?
Is this an issue with AppCompat?
Here are some details:
B4A version=11.20
platform SDK=30
used device: Redmi 8 with Android 10
SetApplicationAttribute(android:requestLegacyExternalStorage, true) in manifest
PERMISSION_WRITE_EXTERNAL_STORAGE=true
Here is the buggy code:
Internal storage name: storage/emulated/0
Folder at the root of internal memory: /mydir
picture in /mydir: 1.jpg
Purpose: display an image
Bug:
The 1.jpg image is displayed on my Redmi with targetSdkVersion = 29
It is not displayed on the same device if targetSdkVersion = 30
I have isolated the problem below in a small app
Thank-you for your help
I have an application no-google running on Android 10 with minSdkVersion=29 and targetSdkVersion=29.
If I put targetSdkVersion = 30, it no longer works on the same Android 10 device.
Why ?
Is this an issue with AppCompat?
Here are some details:
B4A version=11.20
platform SDK=30
used device: Redmi 8 with Android 10
SetApplicationAttribute(android:requestLegacyExternalStorage, true) in manifest
PERMISSION_WRITE_EXTERNAL_STORAGE=true
Here is the buggy code:
B4X:
Sub Process_Globals
Private ApiAndroid As Int
End Sub
Sub Globals
Private wv As WebView
End Sub
Sub Activity_Create(FirstTime As Boolean)
wv.Initialize("wv")
Activity.AddView(wv,0,0,100%x,100%y)
wv.Color=Colors.White
wv.Visible=True
Dim r As Reflector
ApiAndroid=r.GetStaticField("android.os.Build$VERSION","SDK_INT")
Dim rp As RuntimePermissions
Log("ApiAndroid=" & ApiAndroid & " : Requesting WRITE_EXTERNAL_STORAGE permission")
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE) ' Implicit read capability if granted
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
Log($"${Permission} = ${Result}"$)
Dim mystorage As String="/storage/emulated/0"
Dim txtHtml As String=$"<img src="${mystorage}/mydir/1.jpg"/>"$
wv.LoadHtml(txtHtml)
Log(txtHtml)
End Sub
Internal storage name: storage/emulated/0
Folder at the root of internal memory: /mydir
picture in /mydir: 1.jpg
Purpose: display an image
Bug:
The 1.jpg image is displayed on my Redmi with targetSdkVersion = 29
It is not displayed on the same device if targetSdkVersion = 30
I have isolated the problem below in a small app
Thank-you for your help
Last edited: