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

Add an Intent so other apps can use Catlog to send logcat info via email #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RenniePet
Copy link

Sorry, my GitHub skills are approx. zero. I think this pull request probably includes the one I sent you yesterday.

Anyway, I've added an Intent to Catlog so other apps can use it to send logcat info by email. It's not as good as I was hoping - the user is still prompted by the email program to click on Send. I would prefer that it was completely automatic, but that is apparently not possible, or at least not easy.

Hope you can use this.

This facility can be used by another app by doing something like this:

Intent androidIntent = new
Intent("com.nolanlawson.logcat.intents.SEND_EMAIL");

androidIntent.putExtra("recipients", new String[]{"[email protected]"});
androidIntent.putExtra("service", "email");  // Exchange email client,
"gmail", etc. also possible
androidIntent.putExtra("subject", "Logcat file from Android device");
androidIntent.putExtra("device_info", true);
androidIntent.putExtra("attachment", true);
androidIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);  // May be
necessary

startActivity(androidIntent);
@nolanlawson
Copy link
Owner

No prob, I'll combine them all together.

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

Successfully merging this pull request may close these issues.

2 participants