Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

neilboyd/SendLog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SendLog

SendLog was originally released as an app to Google Play.
Due to changes in READ_LOGS permission in Android 4.1, the app became a bit useless. TL;DR: an app can only read it's own logs.
That is why I decided to open source it so that you can include it in your own app.

Brief Instructions

  • Add a dependency to sendlog-library
  • Extend SendLogActivityBase and implement one method
  • Add your activity to the manifest with translucent theme
  • Start the activity at a suitable point in your app

Detailed Instructions

Example

There is a sample project sendlog-userapp which demonstrates all the steps described below.

Add a dependency to sendlog-library

If you're using Maven you can simply add this dependency

<dependency>
   <groupId>org.l6n</groupId>
   <artifactId>sendlog-library</artifactId>
   <version>2.0</version>
   <type>aar</type>
</dependency>

Otherwise you can just download the source and reference it.

Extend SendLogActivityBase and implement one method

Create an activity called SendLogActivity in your project which extends org.l6n.sendlog.library.SendLogActivityBase.

Implement the following method
@Override protected String getDestinationAddress() { return "android@L6n.org"; }.
Obviously you should use your own email address instead of mine for users to send their logs to.

Add your activity to the manifest with translucent theme

In your manifest, add the activity created above
<activity android:name=".SendLogActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>

Start the activity at a suitable point in your app

Somewhere in your app you'll want to allow users to send the log, for example in a Help or About menu.
startActivity(new Intent(this, SendLogActivity.class));

That's it!

About

Diagnostic tool for Android to send the log

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages