The relationship between webview and native code in a mobile application

I need to develop a mobile e-commerce application. To show products in the app, I have to use a webview pointing to a mobile website. Associate the add to cart button with each product. Also this button is an element of the mobile site. On the tab bar (and not in web browsing) of the mobile application, there is a basket icon with the number of basket elements. How can a web view know that a user has added one or more items to the cart and sent this information to their own mobile application, which can update the cart icon?

+7
android ios webview native-code
source share
1 answer

Javascript You are binding the WebView to your Android application using JavascriptInterface. Here are some reference documents: Creating Web Applications in WebView

+10
source share

All Articles