Android Question Solved - webview overrideURL - resumable

tsteward

Well-Known Member
Licensed User
Longtime User
My app displays custom web pages and when I link is clicked I use overrideURL to stop the page from loading then goto another part of the app or get data and process it etc.
I want to execute a link to a resumable sub but then the IDE wants the overrideURL to be a resumable sub instead of boolean which crashes my app

addPosFeedback
addNegFeedback
Are both resumable subs

Sample code:
Private Sub WVCar_OverrideUrl (sentUrl As String) As ResumableSub' Boolean
    #if b4i
    Dim wv1 As WKWebView
    wv1 = Sender
    #else if b4a
    Dim wv1 As WebView
    wv1 = Sender
    #End If
   
   
    Dim find1 As Int
   
    If sentUrl.StartsWith("http://remote") Then
        #if b4j
        #else
        wv1.StopLoading
        #End If
        find1 = sentUrl.LastIndexOf("/")
        Dim remotesID As String = sentUrl.SubString(find1 + 1)
        If sentUrl.StartsWith("http://remote_a") Then
            addPosFeedback("posFeedback",remotesID,"loadRemote")
        Else If sentUrl.StartsWith("http://remote_d") Then
            addNegFeedback("negFeedback",remotesID,"loadRemote")
        else If sentUrl.StartsWith("http://remote_ed") Then
'            EditRemoteFeedbackData(remotesID)
        End If
    End If
    Return True
end sub
 

tsteward

Well-Known Member
Licensed User
Longtime User
Solved
Found the error of my ways.

Further down I had
Wait For (jo) JobDone(jo As HttpJob)

which it didn't like
 
Upvote 0
Top