Hello,
Does anybody know how to get the Current Page Title from a WebView. This was accomplished in b4a by using the 'WebViewsExtender' Library. Here is the b4a code used from the OAuth example which is my ultimate goal.
Thanks!
Does anybody know how to get the Current Page Title from a WebView. This was accomplished in b4a by using the 'WebViewsExtender' Library. Here is the b4a code used from the OAuth example which is my ultimate goal.
B4X:
Sub wv_PageFinished (Url As String)
If Url.StartsWith("https://accounts.google.com/o/oauth2/approval") Then
Dim wv As WebView
wv = Sender
Dim w As WebViewXtender
Dim result As String
result = w.getTitle(wv)
wv.RemoveView 'remove the WebView
If result.StartsWith("Success code") Then
AuthorizationCode = result.SubString("Success code=".Length)
GetAccessToken
Else
Log("Error: " & result)
ToastMessageShow(result, True)
End If
End If
End Sub
Thanks!