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

Update README.md #468

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,40 @@ Snapshot documentation is available at [jakewharton.github.io/timber/docs/latest
</p>
</details>

Set Up
------
I added more details on the existing ReadMe file , focusing on setting up Timber once the dependencies have been downloaded.

### Step 1 : Create an Application class that inherits from Application class .
```
open class MyProjectApplication : Application() {
}
```

### Step 2 : import the application package
import android.app.Application

### Step 3 : override the onCreate() method and initialize the Timber class
override the onCreate() method in your Application class
```
open class MyProjectApplication : Application() {
if (BuildConfig.DEBUG) {
Timber.plant(new DebugTree());
} else {
Timber.plant(new CrashReportingTree());
}
}
```
### Step 4 : Finally Define it in your Android Manifest , Application tag
In your application tag, add it as a name attribute :
```
<application
....
android:name=".MyProjectApplication"
android:theme="@style/AppTheme"
.... >
```

License
-------

Expand Down