Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤖 Unable to export log #663

Open
xa4hf8 opened this issue Jan 31, 2025 · 2 comments
Open

🤖 Unable to export log #663

xa4hf8 opened this issue Jan 31, 2025 · 2 comments
Labels
Android Bug Flutter Flutter UI related

Comments

@xa4hf8
Copy link

xa4hf8 commented Jan 31, 2025

The Android app crashed and I tried to export logs through the “send logs” function in the Support section. When it prompted me to pick an application, I chose a text editor — but the log was not passed to the editor correctly, it only created an empty document, and now I cannot choose a different app for the export target. Since there is nothing in Android Settings / App info / qaul that indicates the current default handler for exported log files, the app should provide a method (or link to instructions) that resets the default handler for the log export activity, in case an incompatible default is chosen by accident.

@xa4hf8 xa4hf8 changed the title Unable to export log 🤖 Unable to export log Jan 31, 2025
@MathJud
Copy link
Member

MathJud commented Feb 1, 2025

Interesting bug! Thanks for reporting it.
The idea behind this feature was to be able to send your logfiles via email to the developers.
Testing your bug, it is true that this not really explained.

@MathJud MathJud added Bug Android Flutter Flutter UI related labels Feb 1, 2025
@xa4hf8
Copy link
Author

xa4hf8 commented Feb 4, 2025

I suppose that you could restrict the share target to e-mail clients by launching an intent using the url_launcher package?

Some GPT example...

import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('Share via Email')),
        body: Center(
          child: ElevatedButton(
            onPressed: _sendEmail,
            child: Text('Send Email'),
          ),
        ),
      ),
    );
  }

  void _sendEmail() async {
    final Uri emailUri = Uri(
      scheme: 'mailto',
      path: '[email protected]',
      queryParameters: {
        'subject': 'Flutter Email Test',
        'body': 'Hello, this is a test email from my Flutter app.'
      },
    );

    if (await canLaunchUrl(emailUri)) {
      await launchUrl(emailUri);
    } else {
      print("Could not launch email app");
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Bug Flutter Flutter UI related
Projects
None yet
Development

No branches or pull requests

2 participants