Skip to content

😇 I’d like to add this to the ReadMe Documentation. #466

@JosephRidge

Description

@JosephRidge

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 inherrits 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 : 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"
      .... >

There was no clear set up process after setting up the dependencies .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions