For the complete documentation index, see llms.txt. This page is also available as Markdown.
Integrating Popin WebView into Your Android App
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.