Release notes
This page provides the release notes of PlanetKit 1.1 for Flutter.
v1.1
Release date: 2025-12-16
Background call verification and adoption
- PlanetKit Flutter SDK now supports verifying and handling incoming calls in background isolates (e.g., Firebase Cloud Messaging handlers) and seamlessly transferring them to the foreground UI isolate.
- This feature enables proper handling of incoming calls when the app is in the background or terminated state.
API
Added
PlanetKitManagerclass 1-to-1 callFuture<PlanetKitVerifyBackgroundCallResult> verifyBackgroundCall(PlanetKitVerifyCallParam param, PlanetKitBackgroundCallEventHandler handler)Future<PlanetKitCall?> adoptBackgroundCall(String backgroundCallId, PlanetKitCallEventHandler handler)
PlanetKitVerifyBackgroundCallResultclass 1-to-1 callPlanetKitBackgroundCallclass 1-to-1 callPlanetKitBackgroundCallEventHandlerclass 1-to-1 call
Usage example
// In background isolate (FCM handler)
('vm:entry-point')
Future<void> firebaseMessagingBackgroundHandler(RemoteMessage message) async {
final result = await PlanetKitManager.instance.verifyBackgroundCall(
param,
PlanetKitBackgroundCallEventHandler(
onVerified: (bgCall, peerUseResponderPrep) {
// Show notification to user
print('Background call verified: ${bgCall.backgroundCallId}');
},
onDisconnected: (bgCall, reason, source, userCode, byRemote) {
// Handle background disconnection
print('Call ended before adoption');
},
onError: (bgCall) => print('Error'),
onBackgroundCallAdopted: (bgCall) => print('Adopted to foreground'),
),
);
if (result.reason == PlanetKitStartFailReason.none) {
final bgCallId = result.call!.backgroundCallId;
// Store bgCallId for foreground adoption
}
}
// Later in foreground/UI isolate
final call = await PlanetKitManager.instance.adoptBackgroundCall(
bgCallId,
PlanetKitCallEventHandler(
onConnected: (_) => print('Call connected'),
onDisconnected: (_, reason, source, userCode, byRemote) {
print('Call ended in foreground');
},
),
);