FAQ
I have two different apps that need to support offline calling with each other. How should I configure them?
- First, you need to configure the index 2 certificate for the second app in the ZEGOCLOUD admin console.

Then, you need to set the certificateIndex
of the second app to secondCertificate
in the place where you initialize the ZegoUIKitPrebuiltCallInvitationService
on the client side.
await ZegoUIKitPrebuiltCallInvitationService().init(
appID: yourAppID /*input your AppID*/,
appSign: yourAppSign /*input your AppSign*/,
userID: currentUser.id,
userName: currentUser.name,
//...
notificationConfig: ZegoCallInvitationNotificationConfig(
iOSNotificationConfig: ZegoIOSNotificationConfig(
certificateIndex: ZegoSignalingPluginMultiCertificate.secondCertificate,
),
),
// ...
)
Read Delaying Auto-entry into Offline Calls After App Launch for solution.
When zego_uikit_prebuilt_call receives a message from FCM, it sends a broadcast to the current application with action com.zegocloud.zegouikit.call.fcm
when the message is not from Zego SDK, similar to the following code:
Intent intent = new Intent("com.zegocloud.zegouikit.call.fcm");
intent.putExtra("remoteMessage", remoteMessage);
context.sendBroadcast(intent);
Therefore, if you have already integrated Firebase Messaging, you only need to follow these steps to complete the migration:
-
Create and statically register a BroadcastReceiver in your application:
- Create a BroadcastReceiver, for example,
YourCustomBroadcastReceiver.java
. - Register it to the
application
node of your application'sManifest.xml
file, and set the action to"com.zegocloud.zegouikit.call.fcm"
, for example:
<receiver android:name="com.zegocloud.uikit.demo.calloffline.YourCustomBroadcastReceiver" android:enabled="true" android:exported="false"> <intent-filter> <action android:name="com.zegocloud.zegouikit.call.fcm"/> </intent-filter> </receiver>
- Create a BroadcastReceiver, for example,
-
Remove your original FCM Service in
Manifest.xml
,it looks like:<service android:name=".java.MyFirebaseMessagingService" android:exported="false"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service>
please remove it to avoid conflict with Zego SDK.
-
Listen and handle the relevant events: You have to migrate your logic from
MyFirebaseMessagingService
toYourCustomBroadcastReceiver
as follow.original code:
public class YourFirebaseMsgService extends FirebaseMessagingService { @Override public void onMessageReceived(RemoteMessage remoteMessage) { // your custom logic } }
please migrate like this,and delete YourFirebaseMsgService.java then:
public class YourCustomBroadcastReceiver extends BroadcastReceiver { private static final String TAG = "CustomReceiver"; public void onReceive(Context context, Intent intent) { com.google.firebase.messaging.RemoteMessage remoteMessage = intent.getParcelableExtra("remoteMessage"); // your custom logic Log.d(TAG, "onReceive.remoteMessage.getData: " + remoteMessage.getData()); } }
With these steps, you should be able to receive and handle your own FCM messages.