Skip to content

[shareFile] Failed to share file on Android (WhatsApp) #38

@Tchano-Py

Description

@Tchano-Py

When I share the file via email, the file is sent along with the title and text. But when I share it on WhatsApp the file is not sent and also the title is not sent.

my code:
`var status = await Permission.storage.request();
if (status.isGranted) {
final baseStorge = await getExternalStorageDirectory();

    final file = '${baseStorge!.path}/$fileName'; 

    final response = await Dio().download(url, file);
    if (response.statusCode == 200) {
      final share = await FlutterShare.shareFile(
        title: 'Proposta: $taskTitulo',
        text: 'Cliente: $taskClienteName',
        filePath: file,
      );

      if (share == true) {
        NotificationService().showNotification(
          title: 'Proposta Guardado',
          body: 'A sua proposta "$taskTitulo", foi guardado com sucesso.',
        );
      }
    } else {
      myMessage("ERROR!⛔.");
    }`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions