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

Conversation

JosephRidge
Copy link

I added more details on the existing documentation file , focusing on the set up process of Timber once the dependencies have been downloaded.

In the documentation of Timber it was not clear on the implementation process in the application in Kotlin, like described in this Fixes #466 #466 (comment).

To fix that, I added the procedure to implement it programmatically in the users code base. It being a documentation update, the necessity of a test was not in mind.

I added the following under the Set Up section.I updated documentation but i can roll back if needed

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

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.
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.

😇 I’d like to add this to the ReadMe Documentation.
1 participant