Skip to content

Commit

Permalink
Version 1.3.0. Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cristidregan committed Jul 13, 2022
1 parent 7e5cc43 commit 47ae9ed
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion OmetriaSDK/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.2.3"
versionName "1.3.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To install the library inside **Android Studio**, declare it as dependency in yo

```gradle
dependencies {
implementation 'com.ometria:android-sdk:1.2.3'
implementation 'com.ometria:android-sdk:1.3.0'
}
```

Expand All @@ -50,22 +50,32 @@ If it can’t find the dependency, you should make sure you've specified `mavenC
Once you've set up your build system or IDE to use the Ometria library, you can initialise it in your code.

We recommend initialising the SDK in your Application subclass. You’ll need to provide:
⋅⋅* the application context;
⋅⋅* your Ometria API token;
⋅⋅* the notifications icon, and;
⋅⋅* the notifications color (optional).
* the application context;
* your Ometria API token;
* the notifications icon;
* the notifications color (optional), and;
* the notifications channel name.

```kotlin
Ometria.initialize(this, "YOUR_API_TOKEN", R.drawable.ic_notification_nys, ContextCompat.getColor(this, R.color.colorAccent))
Ometria.initialize(
application = this,
apiToken = "YOUR_API_TOKEN",
notificationIcon = R.drawable.ic_notification_nys,
notificationColor = ContextCompat.getColor(this, R.color.colorAccent),
notificationChannelName = "Custom Channel Name"
)
```

Ometria logs any errors encountered during runtime by default.

You can enable advanced logging if you want more information on what’s happening in the background. Just add the following line after initialising the library:

```kotlin
Ometria.initialize(this, "YOUR_API_TOKEN", R.mipmap.ic_launcher)
.loggingEnabled(true)
Ometria.initialize(
application = this,
apiToken = "YOUR_API_TOKEN",
notificationIcon = R.drawable.ic_notification_nys
).loggingEnabled(true)
```

5\. Event tracking guide
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/android/sample/SampleApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class SampleApp : Application(), OmetriaNotificationInteractionHandler {
notificationIcon = R.drawable.ic_notification_nys,
notificationColor = ContextCompat.getColor(this, R.color.colorAccent),
notificationChannelName = "Custom Channel Name"

).loggingEnabled(true)

// Set the notificationInteractionDelegate in order to provide actions for
Expand Down

0 comments on commit 47ae9ed

Please sign in to comment.