Im using flutter_email_share.And its not finding my mail app.
PlatformException(not_available, No email clients found!, null, null).
This is my code:
static Future<void> sendPrefilledEmail({
required String filename,
required List<int> bytes,
}) async {
// Generate a String with the path.
final directory = await getTemporaryDirectory();
String filePath = '${directory.path}/$filename';
// Generate the file.
final file = File(filePath);
// Let the callback write data to the file.
await file.writeAsBytes(bytes, flush: true);
final Email prefilledEmail = Email(
body: 'Diagnostic data from my device',
subject: 'Diagnostic data from my device',
recipients: ['[email protected]'],
attachmentPaths: [file.path],
isHTML: false,
);
await FlutterEmailSender.send(prefilledEmail);
}
This is my Android.manifest.
<queries>
<intent>
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="mailto" />
</intent>
</queries>