IOS ReplayKit's alert window doesn't stop Flutter Future execution

26 views Asked by At

I'm using RelayKit for IOS and MediaRecorder for Android to record screen in my Flutter app. I create plugins for both. When the screen record starts, there is alert window letting user know that screen is being recorded and expecting user's response. For Android, it works as expected and the App is paused when alert window is displayed. However for IOS, the Flutter app continues when the alert window is displayed and waiting for user's response. Here is my Flutter code snippet to start screen recording.

await FlutterScreenRecording.startRecordScreen(cTmpVideoFile,recSnd).then((value)
      {
        //for Android, it waits for the alert window to be dismissed
        //for IOS, the alert window doesn't pause the execution
        if (value) { 
          vLength=0;
          ticker!. Start();
          playSound();
          vStatus[1] = false;
        }
        else
        {
          enableTopBar();
          lockScreen(false);
          isSndPlayDone=true;
        }
      });
0

There are 0 answers