At this time, if our scheme is written in a position other than the first page, an error will appear. This error, I think, is due to the conflict between the previous url and the url of the jump Activity. The method to deal with this situation is as follows:
In WebView, override shouldOverrideUrlLoading method in WebViewClient class, the specific code is as follows
In WebView, override shouldOverrideUrlLoading method in WebViewClient class, the specific code is as follows
@Override
public boolean shouldOverrideUrlLoading(WebView view, String httpurl) {
if (httpurl.startsWith("scheme:") || httpurl.startsWith("scheme:")) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(httpurl));
startActivity(intent);
}
return false;
}
The
method is, as long as the url starts with scheme, we jump to the url. So we solved…
Read More:
- Get the startup activity of Android apk
- Android Studio cannot create a new activity and reports ide internal error occurred
- Activity of Android studio_ main.xml Unable to preview (gray page)
- Supplement to the problem of “Session’app’: Error Launching activity” when running on Android
- VCSA web access error 503 Service Unavailable
- Coursera Using python to access Web data quiz 4
- IOS WebView failed to load the web page. Error domain = kcferrodomaincfnetwork code = 310 “there was a problem communicating with the secure web proxy server (HTTPS). “
- Android WebView loading HTTP error [How to Solve]
- Grpc client access server prompt: RPC error: code = unimplemented desc = unknown service possible reasons
- Fabric appears when trying to use application call: Unknown: access denied: Channel [mychannel] creator org [org1msp]
- urlopen error unknown url type:httpë/HTTP Error 400:Bad Request
- Android license status unknown solution
- web.xml Web app error in file
- AndroidStudio Android Unknown failure: Can’t find service: package
- There is more than one Web fragment with the same name: “spring_web”.
- No Internet access error 137 (net::ERR_NAME_RESOLUTION_FAILED): Solution to unknown error
- JWT and token + redis scheme of spring security
- The web project removal server reports an error, and the web project in eclipse cannot be automatically deployed to Tomcat
- An error is reported after Android studio creates a new virtual machine. Emulator: emulator: error: unknown AVD name
- Off line data storage and upload scheme