This guide walks you through the complete setup for embedding the Popin WebView with camera and microphone access into your Android application — now with automatic permission handling through onPermissionRequest.
🛠️ Prerequisites
Before you begin, make sure you have the following:
Android Studio (latest stable version)
Minimum SDK: 21 (Android 5.0, Lollipop)
A valid Popin token
(Replace XXXXX in the sample code with your brand’s actual Popin token)
🔐 Add Required Permissions
To enable video calling, add the following permissions in your AndroidManifest.xml:
<uses-permissionandroid:name="android.permission.CAMERA"/><uses-permissionandroid:name="android.permission.RECORD_AUDIO"/><!-- Optional: for smoother video calls --><uses-permissionandroid:name="android.permission.INTERNET"/><uses-permissionandroid:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
🧱 Create the Call Activity
Create a new file named CallActivity.java in your app package, for example:
This activity embeds the Popin widget in a secure WebView and automatically handles camera and microphone permissions using onPermissionRequest.
📄 CallActivity.java
🧱 Layout XML
Create res/layout/activity_call.xml to define a fullscreen WebView with a close button.
🚀 Launching a Popin Call
Start the call by launching the CallActivity from any part of your app:
📝 Final Notes
✅ No need to manually request permissions — they’re automatically handled through onPermissionRequest.
🔐 Replace XXXXX with your actual Popin token in the WebView URL.
🎯 If the user denies permissions, the WebView will automatically prevent access to the camera/mic.
🧪 Test across Android versions to ensure smooth permission flows.