Android Question Problems with B4XPages, UltimateWebView and SDK 31 (Android 12)

max123

Well-Known Member
Licensed User
Longtime User
Hi all,

I've tried to convert my app to use B4XPages and SDK 31, but encountered some problems that I don't know how to solve.

In past I had an old 32bit PC with Windows XP (I always compiled with SDK <= 29) and now my new 64bit PC with Windows 11 finally arrived.

Because this is absolutely a first time I use B4XPages and SDK 31, I have some questions and please I need some your advices:

1) Using UltimateWebView when I initialize the UltimateWebViewInterface the app crashes and on the log I see a lot of error messages that I do not know at all, the log message was truncated because is longer than 4000 characters, so it is even difficult to post it here a full log. Because I cannot post log and even my full project I just reproduced it on a small project, the result not changed, when I initialize this way the app crashes (Attached the small Zip Project):
B4X:
JSInterface.Initialize(Me)  ' Crash here, what is wrong ?
It even crashes when I set a WebViewClient this way:
B4X:
UltimateWebView1.WebViewClient = True  ' Crash here, what is wrong ?
.... and even crashes when I add a Javascript interface this way because JSInterface failed to initialize:
B4X:
UltimateWebView1.AddJavascriptInterface(JsInterface,"B4A")
Please, note that with old system compiling with SDK <= 29 (But without B4XPages) all works well.

2) In my original project I've used AHViewPager to slide 10 pages, is this good using B4XPages or B4XPages can replace it by just add new pages ?
I can mantain AHViewPager so I do not need to rewrite a lot of code ? Please, note that any page load it's layout created with Designer.

3) In my original project I use 2 services to work in background, is this needed using B4XPages that already can work in background ?
I need to remove it ? And if yes, how to replace ?

4) Because I will release this app on Google Play Store, in past I created the app folder, with other subfolders on DirRootExternal, and now I managed
Runtime Permissons using rp.GetSafeDirDefaultExternal(AppName), this create the app folder on "sdcard/0/Android/data/packagename/files/appname",
this is not good because if the user uninstall the app, Android will remove all folders, subfolders and files containing important datas. How to avoid it
and create the app folder on "/sdcard/0/appname" folder so when the user uninstall the app the data do not deleted ? I need to use ExternalStorage ?

Many thanks
 

Attachments

  • Project.zip
    15.6 KB · Views: 183
Last edited:

max123

Well-Known Member
Licensed User
Longtime User
@DonManfred I see on B4A Changelog that B4A >= 11.5 support API Level 31. Is that correct ?
 
Upvote 0

virpalacios

Active Member
Licensed User
Longtime User
Hi, Everyone, Last week I publish a app in play store using Api Level 31 and B4A 11.80 64bit, my development machine Windows 10 Pro. I am using B4Apages in this app.
Maybe the problem is app specific.
 
Upvote 0
Top