connectycube-flutter-call-kit icon indicating copy to clipboard operation
connectycube-flutter-call-kit copied to clipboard

Open app after accept call

Open hatemragab opened this issue 1 year ago • 2 comments

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

hatemragab avatar Jan 02 '25 22:01 hatemragab

@TatankaConCube please help

hatemragab avatar Jan 02 '25 22:01 hatemragab

please have a look at similar issue https://github.com/ConnectyCube/connectycube-flutter-call-kit/issues/113

CubeRomanMagellan avatar Jan 03 '25 17:01 CubeRomanMagellan