Mobile Integration
Run the Skin Analysis plugin in your mobile app with a WebView. It works on iOS, Android, React Native and Flutter.
Complete example apps: Swift · Kotlin · React Native · Flutter
How it works
-
Load the plugin URL in a WebView:
https://plugin.pulpoar.com/skinai/<project-key> -
Inject the SDK after the page loads, and subscribe to the events you need.
-
Receive events: each event handler posts a JSON message to your native code through the platform's JavaScript bridge.
The WebView setup and bridge code are the same as for Makeup Virtual Try-On. Follow the platform steps in WebView integration and use the Skin Analysis URL above.
For example, on Android:
webView.settings.javaScriptEnabled = true
webView.settings.domStorageEnabled = true
webView.loadUrl("https://plugin.pulpoar.com/skinai/<project-key>")
Things to handle in your app
- Camera permission: add the camera permission to your app (
NSCameraUsageDescriptionon iOS,android.permission.CAMERAon Android) and grant camera access to the WebView. Listen toonCameraPermissionDenyto handle a denied permission. - Go to Product: in a WebView, the plugin can't open product pages for you. Listen to
onProductVisitand open the product page in your app. - Add to Cart: listen to
onAddToCartand add the products to your app's cart. - Full screen: show the plugin full screen on phones, and lock the scroll of the screen behind it.
pulpoar.onProductVisit((payload) => {
postToNative({ event: 'onProductVisit', payload });
});