iOS Question how to get the url of webpage

Ju Yang

Active Member
Licensed User
Longtime User
now ,i open a webpage in webview .i want to get the url of the opening webpage ?
can you give me some advice
 

Attachments

  • K8U0OHG1V}T3D%(PWJ@`8%O.png
    K8U0OHG1V}T3D%(PWJ@`8%O.png
    284 KB · Views: 234

JanPRO

Well-Known Member
Licensed User
Longtime User
You can use

B4X:
Dim NaObj As NativeObject = WebView1
Dim Url As String = NaObj.GetField("request").GetField("URL").GetField("absoluteString").AsString

or something like

B4X:
Dim LastUrl as String

Sub WebView1_PageFinished (Success As Boolean, Url As String)
LastUrl = Url
End Sub
 
Upvote 0
Top