릴리스 노트
Flutter용 PlanetKit 1.1의 릴리스 노트입니다.
v1.1
릴리스 일자: 2025-12-16
백그라운드 통화 검증 및 수용
- PlanetKit Flutter SDK는 이제 백그라운드 아이솔레이트(예: Firebase Cloud Messaging 핸들러)에서 수신 통화를 검증하고 처리한 후 포그라운드 UI 아이솔레이트로 원활하게 전환하는 기능을 지원합니다.
- 이 기능을 통해 앱이 백그라운드 상태이거나 종료된 상태에서도 수신 통화를 적절하게 처리할 수 있습니다.
API
추가
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
사용 예제
// 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');
},
),
);