-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e539ad
commit 1d5c565
Showing
1 changed file
with
33 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
||
|
@@ -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) | ||
|
@@ -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>") | ||
``` | ||
|
@@ -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 | ||
), | ||
|