Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pklawikowski-schibsted authored Feb 15, 2024
1 parent 7e539ad commit 1d5c565
Showing 1 changed file with 33 additions and 6 deletions.
39 changes: 33 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Android Pulse Tracker
==============================
[![Build Status](https://travis.schibsted.io/spt-dataanalytics/event-sdk-android.svg?token=yMrsxKVxxgeGNmkzhMo9&branch=master)](https://travis.schibsted.io/spt-dataanalytics/event-sdk-android)

The most recent production version is `9.0.1`.
The most recent production version is `9.2.5`.

Please do not use this SDK in production without:

Expand All @@ -17,7 +17,7 @@ You can find Javadoc at [https://pages.github.schibsted.io/spt-dataanalytics/eve
<!-- Table of contents generated generated by http://tableofcontent.eu -->
- [Getting Started](#getting-started)
- [Understand the Purpose of `event-formats`](#understand-the-purpose-of-event-formats)
- [Setup Repository](#setup-repository)
- [Setup Schibsted Repository](#setup-schibsted-repository)
- [Add `event-sdk-android` Library](#add-event-sdk-android-library)
- [Google Play Services](#google-play-services)
- [Other Dependencies](#other-dependencies)
Expand Down Expand Up @@ -98,11 +98,38 @@ Since version 7, you can use this SDK without a dependency on `event-formats-jvm
This SDK is designed to work in multithreaded environment. Internally it uses 2 threads.


### Setup Repository
### Setup Schibsted Repository
The SDK is released on Schibsted artifactory and Sonatype.

To use Schibsted artifactory, you need to include
this repository with its credentials (you might already have it):
```kotlin
val artifactoryContext = properties["artifactory_context"]?.toString() ?: System.getenv("ARTIFACTORY_CONTEXT")
maven {
url = uri("$artifactoryContext/libs-release")
credentials {
username = properties["artifactory_user"]?.toString() ?: System.getenv("ARTIFACTORY_USER")
password = properties["artifactory_pwd"]?.toString() ?: System.getenv("ARTIFACTORY_PWD")
}
}
```
You can either set the credentials as environment variables:
```
export [email protected]
export ARTIFACTORY_PWD=<artifactory-password>
export ARTIFACTORY_CONTEXT=https://artifacts.schibsted.io/artifactory
```
Or as gradle properties, suggested at `~/.gradle/gradle.properties`:
```
[email protected]
artifactory_pwd=<artifactory-password>
artifactory_context=https://artifacts.schibsted.io/artifactory
```

Sonatype artifact is available from `mavenCentral()` repository.

### Add `event-sdk-android` Library
Once repository is set up, add the following line to your `build.gradle`:
Once Schibsted artifactory is set up, add the following line to your `build.gradle`:
```kotlin
implementation("com.schibsted.spt.tracking:event-sdk-android:<version>")
```
Expand Down Expand Up @@ -394,8 +421,8 @@ The code example below shows a valid `Consent object` passed through the `tracke
```java
Consents consents = (new Consents(
new ConsentPurposes(
new ConsentPurpose(ConsentStatus.ACCEPTED, "1"), // CMP_ESSENTIALS
new ConsentPurpose(ConsentStatus.ACCEPTED), // CMP_ANALYTICS
new ConsentPurpose(ConsentStatus.ACCEPTED, "1"), // CMP_ANALYTICS
new ConsentPurpose(ConsentStatus.ACCEPTED), // CMP_MARKETING
new ConsentPurpose(ConsentStatus.ACCEPTED), // CMP_ADVERTISING
new ConsentPurpose(ConsentStatus.REJECTED) // CMP_PERSONALIZATION
),
Expand Down

0 comments on commit 1d5c565

Please sign in to comment.