Open lopallo opened 10 months ago
Hello, on Android with version 0.1.1 I had no problem to export a file, but using version 0.2.8 I get this error: D/FileSaver( 5086): Error While Calling methodNo Activity found to handle Intent { act=android.intent.action.CREATE_DOCUMENT cat=[android.intent.category.OPENABLE] flg=0xc3 (has extras) }
Which android version and can you possibly share a code block?
I verified with Nexus 5Xapi30 emulator and with smartphone with Android 13
Future exportTurni() async { String esporta = await dbTurni.exportDbTurni(); final directory = await getApplicationDocumentsDirectory(); final path = directory.path; File file = File('$path/turni_mensili.json'); await file.writeAsString(esporta); //controlla se il file è stato effettivamente esportato if (file.existsSync()) { //esporta il file Uint8List bytes = file.readAsBytesSync(); FileSaver.instance.saveAs('turniMensili', bytes, 'json', MimeType.JSON); } else { //mostra un messaggio di errore ScaffoldMessenger.of(context).showSnackBar( const SnackBar( content: Text( 'Errore durante l\'esportazione del file', ), ), ); } } }
Hello, on Android with version 0.1.1 I had no problem to export a file, but using version 0.2.8 I get this error: D/FileSaver( 5086): Error While Calling methodNo Activity found to handle Intent { act=android.intent.action.CREATE_DOCUMENT cat=[android.intent.category.OPENABLE] flg=0xc3 (has extras) }