Thank you for your answers. It has been solved now, but I still don’t understand the principle. I hope someone can explain the reason. This method was set up before, but the display is outdated and some shopping websites such as Taobao and Tmall cannot be loaded correctly:
This tamll is used to wake up the Tmall APP on the mobile phone. Because the default webview does not support waking up any app, an error will occur.
If you want to open Tmall or Taobao on the current page , you need to re-parse its link. You can see that the url of the actual product is "url?=" after the question mark. You can parse the value of the url and open it by calling webview. This is modified in the same place as wake-up, both in shouldOverrideUrlLoading. The loaded url here determines whether it starts with tmall. If it does, parse it. If not, determine whether it starts with http or https, and then load it
You can read this article. I have done a wake-up call but can’t find the code.
Thank you for your answers. It has been solved now, but I still don’t understand the principle. I hope someone can explain the reason.
This method was set up before, but the display is outdated and some shopping websites such as Taobao and Tmall cannot be loaded correctly:
It will be ok if I switch to another method of overloading later, but I still hope someone can explain why?
You can also directly copy the following method
I found an article explaining WebView in detail
It should be that webview cannot recognize tmall at the beginning of the URL. You can try replacing it with https every time webview loads
This tamll is used to wake up the Tmall APP on the mobile phone. Because the default webview does not support waking up any app, an error will occur.
If you want to open Tmall or Taobao on the current page
, you need to re-parse its link. You can see that the url of the actual product is "url?=" after the question mark. You can parse the value of the url and open it by calling webview. This is modified in the same place as wake-up, both in shouldOverrideUrlLoading. The loaded url here determines whether it starts with tmall. If it does, parse it. If not, determine whether it starts with http or https, and then load it
You can read this article. I have done a wake-up call but can’t find the code.
http://www.jianshu.com/p/fd04...
tmall:// This is the jump schema protocol dedicated to Tmall app. You definitely cannot open it in webview.
If you have the Tmall app client installed on your phone, you can automatically wake up the app to open the page