HomeiOS DevelopmentStop iOS from opening Information app after closing Excel opened through OpenFilex...

Stop iOS from opening Information app after closing Excel opened through OpenFilex in Flutter


I’ve a Flutter app that downloads an Excel (.xlsx) file and opens it on iOS utilizing the open_filex bundle’s OpenFilex.open() technique. The Excel file opens accurately on high of my app. Nonetheless, after I faucet the Performed button contained in the Excel app to shut the file, after a couple of seconds iOS routinely switches to the Information app exhibiting the folder containing that file.

This interrupts my app’s person expertise by taking the person away unexpectedly.

Here’s a simplified model of my file obtain and open code utilizing the open_filex bundle:

Future downloadXlsxFileForIOS({required FileData filedata}) async {
  Uint8List bytes = base64.decode(filedata.fileBufferData);
  last fileName = filedata.fileName.endsWith('.xlsx')
      ? filedata.fileName
      : '${filedata.fileName}.xlsx';

  last documentsDir = await FileDownloadManager.occasion.getDownloadFilePath();
  last filePath="${documentsDir?.path ?? "'}/$fileName';
  last file = File(filePath);
  await file.writeAsBytes(bytes);

  await OpenFilex.open(filePath);
}

Why does iOS open the Information app routinely after closing the Excel viewer opened through open_filex from my app?

Is there any method to cease or forestall this redirect to the Information app when utilizing open_filex or related on iOS?

Are there really useful approaches for dealing with Excel recordsdata in iOS Flutter apps with out triggering this Information app habits?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments