fingerprintjs / fingerprintjs-android

Swiss army knife for identifying and fingerprinting Android devices. MIT license, no restrictions on usage in production.
https://fingerprint.com/github/
MIT License
586 stars 84 forks source link

Update README.md #4

Closed Valve closed 4 years ago

Valve commented 4 years ago

Change the structure and improve wording

Valve commented 4 years ago

Here is an API I would like to consume (in JS for simplicity)


// Scenario 1 (basic usage)

// class name that acts as an entry point
import Fingerprinter  from "FingerprintJS"

// simple init procedure
let fingerprinter = Fingerprinter.init()

// get device fingerprint
let fingerprint = fingerprinter.getFingerprint()

// Scenario 2, advanced usage
import Fingerprinter  from "FingerprintJS"

let fingerprinter = Fingerprinter.init({option1: "value", option2: "value"})

// get fingerprint with options
let fingerprint = fingerprinter.getFingerprint({installedApps: true})

// use fingerprint
console.log(fingerprint.deviceId)
console.log(fingerprint.signals) // array of signals, e.g. list of apps

// use a specific signal
fingerprint.signals[0]

This is not directly applicable, but hopefully can be helpful in simplifying your API