Skip to content

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

Open
RenniePet wants to merge 2 commits into
nolanlawson:masterfrom
RenniePet:branch-for-email-intent
Open

Add an Intent so other apps can use Catlog to send logcat info via email#45
RenniePet wants to merge 2 commits into
nolanlawson:masterfrom
RenniePet:branch-for-email-intent

Conversation

@RenniePet
Copy link
Copy Markdown

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[]{"some@email.com"});
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
Copy Markdown
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