Android Question problem with cookies

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
hello all
i have my account web page that shows my internet credit , i kept my cookies value witch expire after a month
when i used that value in my laptop chrome internet explorer it works when i add that cookies value to the credit page ,
but when i added the cookies value to webview in B4A it redirects me login page again.

this is the code i'm using
B4X:
Sub Activity_Create(FirstTime As Boolean)
  WebView1.Initialize("WebView1")
    Activity.AddView(WebView1, 0, 0, 100%x, 100%y)
    '    call SetAcceptCookie after WebView has been initialized
 
    CookieManager1.SetAcceptCookies(True)
    CookieManager1.SetCookie("http://xx.xx.xx.xx","__vse=xx&__vsa=x&__vbls=x&__vsu=x&__vbl=x&__cstv=x&__vsd=x")
 
    '    load a webpage that requires a login
    Dim Url As String
    Url="http://xx.xxxx.net.xx/xxx/xxxx.aspx"    '    change this to your login page
    WebView1.LoadUrl(Url)
End Sub

any ideas??
 
Last edited:
Top