We are now doing an activity page, Android and iOS activity page to do with the Web, easy to change, there are a few small problems;
1, in Android and iOS, although the Web can save Localstorage, but to the Android and iOS on the invalid, that is, can not store localstorage, and the cookie can be stored;
2, Android and iOS to the Web page this and simple, just need to write a normal function on the web side, in the Android and iOS direct call method, the following data is passed back parameters, such as
function Receiveappwishlist (data) {wish_list = Json.parse (data);}
3, the Web page to the Android and iOS, here is a little different, Android uses:
Window.toApp.productId (json.stringify (' argument '))
The above toapp is an object defined by Android; The method name is ProductId
iOS, however, is:
Window.webkit.messageHandlers.productId.postMessage ("argument")
The above iOS pass format is fixed, and the same ProductID is the method name. Window.webkit.messageHandlers. Method name. PostMessage ("argument")
Android iOS nested Web page