Custom web agent?

straybullet

Member
Licensed User
Longtime User
Is it possible to set webview to have a custom web agent?

I want to restrict traffic to one of my web sites to my application only and figured this would stop 95% of the people from ever accessing it directly.

Based on a custom web agent I would reject all traffic that wasn't from my app.
 
Requires the WebViewSettings library, as NJDude mentioned above, but here is some example code:
Code: Copy
Sub Globals
    Dim WebView1 As WebView
    Dim wvs1 As WebViewSettings
End Sub

Sub Activity_Create(FirstTime As Boolean)
    WebView1.Initialize("Webview1")
    Activity.AddView(WebView1, 0, 0, 100%x, 100%y)
    wvs1.setUserAgentString(WebView1, "DESKTOP_USERAGENT")
    '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    WebView1.LoadUrl("http://www.google.com")
End Sub
 
Upvote 0
Back
Top