Android Question How to test WebView project on phone via B4ABridge?

josejad

Expert
Licensed User
Longtime User
Upload your project so we can test it.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
It works fine on my phone (Samsung A10), just take a little while to load.

1636468751223.png
 
Upvote 0

gacar

Active Member
I waited a few minutes and still didn't work. But my phone old model (Samsung J7). If it worked on your phone, most likely the problem is with my phone. Are phone models necessary in running apps?
 
Upvote 0

gacar

Active Member
But if i use a known website (e.g google.com) it is working well.
 

Attachments

  • Screenshot_20211109-183437.png
    Screenshot_20211109-183437.png
    44.6 KB · Views: 170
Upvote 0

FrostCodes

Active Member
Licensed User
Longtime User
I waited a few minutes and still didn't work. But my phone old model (Samsung J7). If it worked on your phone, most likely the problem is with my phone. Are phone models necessary in running apps?
I think it won't work on older devices.. android < 5 because I noticed the libaried used in the JS part uses es6 JS code.
Without a polyfill or chrome client attached like in webviewextras, older devices don't have this code support I think.
 
Upvote 0

gacar

Active Member
I think it won't work on older devices.. android < 5 because I noticed the libaried used in the JS part uses es6 JS code.
Without a polyfill or chrome client attached like in webviewextras, older devices don't have this code support I think.
But how can open google.com?
 
Upvote 0

FrostCodes

Active Member
Licensed User
Longtime User
But how can open google.com?
Remember I mentioned using polyfill, google homepage by the way is very simple and light depending on the device so it's not an issue.
Search for Es6 polyfill and add it to your code, it might be able to work.
I use vuejs so it handles this for me with Babel but for normal HTML, there are many polyfills online.
 
Upvote 0

gacar

Active Member
Remember I mentioned using polyfill, google homepage by the way is very simple and light depending on the device so it's not an issue.
Search for Es6 polyfill and add it to your code, it might be able to work.
I use vuejs so it handles this for me with Babel but for normal HTML, there are many polyfills online.
Thank for reply. How can i add polyfill to project? Should i open new topic on forum for this (adding polyfill to project)
 
Upvote 0

gacar

Active Member
I would advise that you make your app minimum SDK target android 5.
The older android versions do not support a lot of JS features.

I made a sample fix for you but even I cannot recommend that you use this in a live app as over time, it might be really painful to maintain.

View attachment 121568

Thanks for solution. Yes worked, but perhaps it is not effective, should are clients install each time index.html and other files? Where will store them files? I think i need buy a new phone.
 
Upvote 0

FrostCodes

Active Member
Licensed User
Longtime User
Thanks for solution. Yes worked, but perhaps it is not effective, should are clients install each time index.html and other files? Where will store them files? I think i need buy a new phone.
Actually, you can store it in DirInternal... it works well for me but still as I said updating this solution later might be a pain for you
 
Upvote 0
Top