For the complete documentation index, see llms.txt. This page is also available as Markdown.

Popin Android SDK v2 – Integration Documentation

A video calling SDK for Android that enables seamless video communication with queue management, scheduling, and real-time notifications.

Requirements

  • Min SDK: 24 (Android 7.0)

  • Target SDK: 35 (Android 15)

  • Java: 17


Integration

Step 1: Add JitPack Repository

settings.gradle.kts

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven {
            url = uri("https://jitpack.io")
            credentials { username = "YOUR_JITPACK_TOKEN" }
        }
    }
}

settings.gradle (Groovy)

Store the token securely in local.properties (do not commit this file):

Then load it in your root build.gradle:

Step 2: Add the Dependency

Step 3: Configure AndroidManifest.xml

Step 4: Initialize and Use


Setup

Configure AndroidManifest.xml

Add the POPIN_TOKEN metadata inside the <application> tag. You will receive this token from the Popin Dashboard or your administrator.

Note: The SDK manages runtime permissions automatically. Make sure your app has internet access enabled.


Initialization

Initialize the SDK using PopinConfig. This is typically done in your Application class or the onCreate() method of your main Activity.

Import Statements

Step 1: Prepare Meta Data (Optional)

Step 2: Prepare Product Data (Optional)

Step 3: Build the Configuration

Step 4: Initialize the SDK


Configuration Options

User Information

Method
Description

userName(String)

User's display name

contactInfo(String)

User's phone number or email

callerId(String)

Custom caller identifier

identifier(String)

Unique identifier for the user in your system (e.g. user ID or email). Can also be set later using setIdentifier()

Environment

Method
Description
Default

sandboxMode(boolean)

Use sandbox server for testing

false

persistenceMode(boolean)

Reuse existing SDK instance across re-initializations

true

debugMode(boolean)

Enable verbose SDK logging

false

enableIncomingCalls(boolean)

Enable incoming calls via FCM

false

startWithVideoDisabled(boolean)

Start calls with camera disabled

false

UI Button Visibility

Method
Description
Default

hideDisconnectButton(boolean)

Hide disconnect button

false

hideScreenShareButton(boolean)

Hide screen share button

false

hideFlipCameraButton(boolean)

Hide camera flip button

false

hideMuteVideoButton(boolean)

Hide video mute button

false

hideMuteAudioButton(boolean)

Hide audio mute button

false

hideBackButton(boolean)

Hide back button

false

Product, Metadata & Labels

Method
Description

product(Product)

Product associated with the call

meta(Map<String, String>)

Custom metadata

expertDesignation(String)

Expert role label

secondaryProductText(String)

Additional product card text

initListener(PopinInitListener)

Initialization callbacks

Runtime Configuration Updates

You can update product, callerId, and meta before starting a call without reinitializing the SDK.

Updating User Name and Contact Info

Setting User Identifier After Init


Usage

Setting the Events Listener

Starting a Video Call

Cancelling a Call

Logging Out / Deinitializing the SDK

Note: After calling deinit(), Popin.getInstance() will throw until Popin.init() is called again.


Scheduling a Call

Get Available Schedule Slots

Create a Scheduled Call


Setting a User Group


Inviting Participants


Receiving Incoming Calls via FCM

Important: For incoming calls to work, Popin.init() must be called in your Application class.

Required Permission

Application Initialization

Register in AndroidManifest.xml:

Enable incoming calls:

Forward the FCM Token

Forward Incoming Call Messages

Note: Popin messages contain "source": "popin" in the data payload.

Call Accepted Callback (Optional)

Method
Description

onCallAccepted(int callId)

Called when an incoming call is accepted

FCM Flow


Event Listeners Reference

PopinInitListener

Method
Description

onInitComplete(int userId)

SDK initialized and ready

onInitFailed(String reason)

Initialization failed

PopinEventsListener

Method
Description

onPermissionGiven()

Permissions granted

onPermissionDenied()

Permissions denied

onCallStart(int callId)

Call started and queued

onCallCancel()

Call cancelled

onQueuePositionChanged(int position)

Queue position updated

onCallMissed()

Call missed

onCallNetworkFailure(String participant)

Network issue detected

onCallConnected()

Call connected

onCallFailed()

Call failed

onCallEnd()

Call ended

onPipStateChanged(boolean isInPipMode)

PiP mode changed

PopinScheduleListener

Method
Description

onAvailableScheduleLoaded(List<ScheduleSlot>)

Schedule slots loaded

onScheduleLoadError()

Failed to load slots

PopinCreateScheduleListener

Method
Description

onScheduleCreated()

Schedule created

onScheduleLoadError()

Failed to create schedule

PopinInviteListener

Method
Description

onInviteSuccess(String inviteUrl)

Invite URL generated

onInviteFailed(String reason)

Invite generation failed

PopinSetGroupListener

Method
Description

onSuccess()

Group assigned successfully

onFailed(String reason)

Failed to assign group


Permissions

The SDK automatically requests the following permissions at runtime:

Permission
Purpose

INTERNET

Network communication

CAMERA

Video capture

RECORD_AUDIO

Audio capture

MODIFY_AUDIO_SETTINGS

Audio routing

ACCESS_NETWORK_STATE

Network status

BLUETOOTH_CONNECT

Bluetooth audio (Android 12+)


ProGuard Configuration

The SDK ships consumer ProGuard rules in both PopinCustomerSDK and PopinCommonSDK. These rules are merged automatically into your release build when using the AAR.

No manual ProGuard configuration is required.


Environment Configuration

Production

Sandbox (Testing)

Last updated