Android Question Sdk 30

Sergey_New

Well-Known Member
Licensed User
Longtime User
WebView stopped displaying image at Sdk=30. At 29 everything works. Installed everything necessary for version 30 in Sdk Manager. What needs to be fixed?
 
Solution
In Sdk versions below 30 this was possible.
Looks like the requirements/possibilities have changed.
Check https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/

It will not work with targetSdkVersion=30. Avoid using File.DirRootExternal. Either use File.DirInternal or RuntimePermissions.GetSafeDirDefaultExternal.
Options to access the secondary storage: https://www.b4x.com/android/forum/threads/saveas-let-the-user-select-a-target-folder.129897/#content
/storage/emulated/0/ IS the same as File.DirRootExternal

BlueVision

Active Member
Licensed User
Longtime User
It's eventually a problem of access (a missing permission or something like that) if you are loading the image from a location on your phone's memory. Think the forum needs some more information from your site in that case to help you. Some type of code or a more detailled description of your problem.
 
Upvote 0

jahswant

Well-Known Member
Licensed User
Longtime User
Check this :

 
Upvote 0

Sergey_New

Well-Known Member
Licensed User
Longtime User
Some type of code or a more detailled description of your problem.
The image file is located in the Media folder in the Generations application folder. With Sdk 29 everything is OK.
Code:
WebView1.LoadHtml("<html><body bgcolor='silver' style='margin: 0px; padding: 0px'><div align='center'><img src='/storage/emulated/0/Generations/Media/rs1782_1.gif' style='width: 356px'/></div></body></html>")
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
In Sdk versions below 30 this was possible.
Looks like the requirements/possibilities have changed.
Check https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/

It will not work with targetSdkVersion=30. Avoid using File.DirRootExternal. Either use File.DirInternal or RuntimePermissions.GetSafeDirDefaultExternal.
Options to access the secondary storage: https://www.b4x.com/android/forum/threads/saveas-let-the-user-select-a-target-folder.129897/#content
/storage/emulated/0/ IS the same as File.DirRootExternal
 
Last edited:
Upvote 0
Solution
Top