PushwooshCallSettings

Configuration and settings management for Pushwoosh VoIP calls functionality.

This singleton provides methods to configure VoIP call behavior, request necessary permissions, and customize the call experience in your Android application. It manages phone account settings, notification channels, ringtone customization, and permission status tracking.

Key Features:

  • Request VoIP call permissions (READ_PHONE_NUMBERS)

  • Configure phone account and handle names for Android Telecom Framework

  • Customize notification channel names for incoming and ongoing calls

  • Set custom ringtone for incoming VoIP calls

  • Check permission status for VoIP functionality

Quick Start:

// Request VoIP call permissions
PushwooshCallSettings.requestCallPermissions { granted, grantedPerms, deniedPerms ->
if (granted) {
Log.d("App", "VoIP permissions granted")
} else {
Log.w("App", "Permissions denied: $deniedPerms")
}
}

// Customize call settings
PushwooshCallSettings.setIncomingCallChannelName("Video Calls")
PushwooshCallSettings.setCallSound("custom_ringtone")

// Check permission status
when (PushwooshCallSettings.getCallPermissionStatus()) {
0 -> requestPermissions() // Not requested
1 -> enableVoIP() // Granted
2 -> showPermissionDenied() // Denied
}

Important Notes:

  • Requires Android 8.0+ (API 26+) for full Telecom Framework support

  • READ_PHONE_NUMBERS permission is required for VoIP calls on Android 8+

  • Custom CallEventListener must be registered in AndroidManifest.xml

  • Works with FCM/HMS push notifications containing voip=true flag

See also

Functions

Link copied to clipboard

Gets the current VoIP call permission status.

Link copied to clipboard

Requests VoIP call permissions from the user without a callback.

Requests VoIP call permissions from the user with a result callback.

Link copied to clipboard

Sets the custom ringtone sound for incoming VoIP calls.

Link copied to clipboard

Sets the notification channel name for incoming VoIP call notifications.

Link copied to clipboard

Sets the timeout duration for incoming VoIP calls.

Link copied to clipboard

Sets the notification channel name for ongoing VoIP call notifications.

Link copied to clipboard
fun setPhoneAccount(phoneAccount: String)

Sets the phone account name for VoIP calls in the Android Telecom Framework.

Link copied to clipboard
fun setPhoneAccountHandle(phoneAccountHandle: String)

Sets the phone account handle name for VoIP calls in the Android Telecom Framework.