i use AddJavascriptInterface in my app, the code is
when i build my app release(obfuscated), i can't get the title
i know the problem is the sub name has been changed because obfuscated
but i don't want to build my app without obfuscate
Are there any other solutions?
thanks
B4X:
WebView1.Initialize("WebView1")
WebViewExtras1.Initialize(WebView1)
Dim JavascriptInterface1 As DefaultJavascriptInterface
JavascriptInterface1.Initialize
WebViewExtras1.addJavascriptInterface(JavascriptInterface1, "B4A")
Activity.AddView(WebView1, 0, 0, 100%x, 100%y)
WebView1.LoadUrl("https://www.b4x.com/android/forum/forums/questions.26/")
Sub WebView1_PageFinished (Url As String)
WebViewExtras1.executeJavascript("B4A.CallSub('JavascriptCallback', true, document.title)")
End Sub
Sub JavascriptCallback(title As String)
Log("web page title = " & title)
End Sub
when i build my app release(obfuscated), i can't get the title
i know the problem is the sub name has been changed because obfuscated
but i don't want to build my app without obfuscate
Are there any other solutions?
thanks