Android Question Problem with WebView and cookies

Could someone help me better understand this point about WebView? I'm trying to open a URL, but it generates a message in WebView:

Browser cookies
To place an order you first need to allow 3rd party cookies, local storage access and cross-site tracking from your browser settings.

To allow cookies, local storage access and / or cross-site tracking please check the settings links below:
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Try this:
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    Me.as(JavaObject).RunMethod("allowThirdPartyCookies", Array(WebView1))
End Sub

#if Java
public void allowThirdPartyCookies(android.webkit.WebView wv) {
    android.webkit.CookieManager.getInstance().setAcceptThirdPartyCookies(wv, true);
}
#End If

Assuming that it is a B4XPages project.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…