Android Question Webviev and white page

coslad

Well-Known Member
Licensed User
Longtime User
Hi

i tried this symple code but Always i get a White page :

B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
Dim wv As WebView
End Sub
 
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
wv.Height=Activity.Height
wv.Width=Activity.Width
wv.LoadURL("www.google.it")
End Sub

Manifest :

B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="26"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
    AddPermission(android.permission.INTERNET)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

Tested on Android 8 and Android 7 devices , where i wrong ?
 

MarkusR

Well-Known Member
Licensed User
Longtime User
try with http://
B4X:
.LoadUrl("http://www.google.com")
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
maybe u need this runtime permissions at sdk 26?

do you see something in "Check the unfiltered logs:" ?
there is a checkbox beside logs in ide.
 
Last edited:
Upvote 0

coslad

Well-Known Member
Licensed User
Longtime User
In attach the project and apk file compiled with B4A 8.3 beta 1, on my Mate 10 pro with android 8 i see only White screen
 

Attachments

  • wv.zip
    7 KB · Views: 315
  • webview.apk
    173.5 KB · Views: 312
Upvote 0

coslad

Well-Known Member
Licensed User
Longtime User
Thanks you are right !

but the real problem in the main project was this code :

B4X:
wv.initialize("wv")
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…