connectycube-flutter-call-kit
connectycube-flutter-call-kit copied to clipboard
Open app after accept call
can i Open app after accept call from a notifiaction of call ?
- platfrom android i have used code like
@pragma('vm:entry-point')
Future<void> onCallAcceptedWhenTerminated(CallEvent callEvent) async {
print("--------------------------------------------------------");
print("BK onCallAcceptedWhenTerminated $callEvent");
print("--------------------------------------------------------");
BgLauncher.bringAppToForeground(
action: 'FBI-OPEN-UP',
extras: {
"title": "FBI OPEN UP",
"message": "The FBI is open up!",
"color": "#FF0000",
"priority": "high",
"visibility": "public",
"notificationId": "1",
},
);
BackgroundToForeground.bringToForeground();
// the call was accepted
const packageName = 'com.example.example';
const intent = AndroidIntent(
action: 'android.intent.action.MAIN',
package: packageName,
flags: <int>[Flag.FLAG_ACTIVITY_NEW_TASK],
componentName: 'com.example.example.MainActivity',
);
await intent.launch();
}
all of this failed
@TatankaConCube please help
please have a look at similar issue https://github.com/ConnectyCube/connectycube-flutter-call-kit/issues/113