From 4f39718c668e8dbd143660aec978a00c6fd89dab Mon Sep 17 00:00:00 2001 From: Joseph Ridge <42699812+JosephRidge@users.noreply.github.com> Date: Tue, 10 May 2022 18:00:29 +0300 Subject: [PATCH] Update README.md Documentation update by addition of the Set Up section , that describes or provides more details on how to set it up in ones code base. --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 48aa48d97..0d64833fe 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,40 @@ Snapshot documentation is available at [jakewharton.github.io/timber/docs/latest
+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 : + ``` +