Skip to content

Commit 954c6f7

Browse files
authored
Merge pull request #3 from thunderheadone/MOB-1946-opt-out-feature
[MOB-1946] Android: Add ability to opt out
2 parents 1f8d534 + 3c15d6c commit 954c6f7

File tree

9 files changed

+340
-190
lines changed

9 files changed

+340
-190
lines changed

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repositories {
3333
}
3434
}
3535
```
36-
*Note:*
36+
*Note:*
3737
* Requires minimum API level 21+.
3838

3939
## Usage
@@ -67,7 +67,7 @@ One.init(
6767
```
6868
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L34)
6969

70-
### Send an Interaction
70+
### Send an Interaction
7171
To send an Interaction request without properties, call the following method:
7272
```javascript
7373
One.sendInteraction("/interactionPath", null);
@@ -87,6 +87,26 @@ One.getTid();
8787
```
8888
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L78)
8989

90+
### Opt an end-user out of tracking
91+
To opt an end-user out of all tracking options, when the end-user does not give permission to be tracked in the client app, call the following method:
92+
```javascript
93+
// Opts out of all tracking options.
94+
One.optOut(true);
95+
```
96+
97+
To opt back in, call the following method:
98+
```javascript
99+
// Opt in for all tracking options.
100+
One.optOut(false);
101+
```
102+
103+
#### Opt an end user out of city country level tracking
104+
To opt an end-user out of city/country level tracking, call the following method:
105+
```javascript
106+
// Calling this method will opt the end-user back in for all tracking.
107+
One.optOutCityCountryDetection(true);
108+
```
109+
90110
### Access debug information
91111
To configure logging, call the following method:
92112
```javascript

android/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.2.1'
11+
classpath 'com.android.tools.build:gradle:3.6.4'
1212
// noinspection DifferentKotlinGradleVersion
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
@@ -52,7 +52,6 @@ android {
5252

5353
repositories {
5454
mavenCentral()
55-
jcenter()
5655
google()
5756
maven {
5857
url 'https://thunderhead.mycloudrepo.io/public/repositories/one-sdk-android'
@@ -130,5 +129,5 @@ dependencies {
130129
api 'com.facebook.react:react-native:+'
131130
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
132131

133-
implementation "com.thunderhead.android:one-sdk:8.2.0"
132+
implementation "com.thunderhead.android:one-sdk:11.1.4"
134133
}

0 commit comments

Comments
 (0)