Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-Verkhovsky authored Sep 15, 2021
1 parent a7289ed commit 590107c
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ allprojects {
}}
```

### 2. Download the latest [release](https://github.com/fingerprintjs/fingerprintjs-pro-android-integrations/releases) to the `libs` folder of your application.
### 2. Download the *.aar lib from the latest [release](https://github.com/fingerprintjs/fingerprintjs-pro-android-integrations/releases) to the `libs` folder of your application module.


### 3. Add a dependency to your `build.gradle` file
### 3. Add a dependency to your `build.gradle` file of the module

```gradle
dependencies {
Expand All @@ -63,6 +63,7 @@ buildscript {

Retrieve the visitor identifier using browser token. You can find your [browser token](https://dev.fingerprintjs.com/docs) in your [dashboard](https://dashboard.fingerprintjs.com/subscriptions/).

#### 4.1 Kotlin example

```kotlin
// Initialization
Expand All @@ -83,6 +84,27 @@ fpjsClient.getVisitorId { visitorId ->
}
```

#### 4.2 Java example

```java

FPJSProFactory factory = new FPJSProFactory(this.getApplicationContext());
Configuration configuration = new Configuration("BROWSER_TOKEN", Configuration.Region.US, Configuration.Region.US.getEndpointUrl());
// Or you can choose Region.EU

FPJSProClient fpjsClient = factory.createInstance(
configuration
);

fpjsClient.getVisitorId(new Function1<String, Unit>() {
@Override
public Unit invoke(String visitorId) {
// Use visitorId
return null;
}
});
```

*❗ Important: Due to WebView limitations the initialization of the client is performed on the UI-thread, consider call `getVisitorId()` while the screen is static.*


Expand Down

0 comments on commit 590107c

Please sign in to comment.