Skip to content

Commit

Permalink
Merge pull request #3 from bayonetio/develop
Browse files Browse the repository at this point in the history
min SDK update
  • Loading branch information
imran-arshad authored Jun 19, 2023
2 parents 79a0cdf + f22b6fb commit 14cdf22
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 43 deletions.
48 changes: 10 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Fingerprint Android SDK
A basic library to generate the fingerprint of a device.
# fingerprint-android-sdk
The *fingerprint-android-sdk* is a library for *Android* that determines the device's fingerprint and store it in our backend.

This is developed with **Kotlin**.
This was developed with *Kotlin*.

## Integrate into your project

Expand Down Expand Up @@ -30,44 +30,16 @@ dependencies {
### Example of the use in your app
This is an example of the use of *Fingerprint Android SDK*.
```kotlin
package io.bayonet.fingerprint.example

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch

import android.widget.TextView

import io.bayonet.fingerprint.core.domain.Token
import io.bayonet.fingerprint.services.FingerprintService

class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

val helloTextView = findViewById<TextView>(R.id.hello_text_view)
...

runOnUiThread(Runnable {
val apiKey = "your-fingeprint-api-key"
val fingerprintService = FingerprintService(
apiKey,
this, // The main context
)
val fingerprintService = FingerprintService(
this,
"12345678"
)

GlobalScope.launch {
try {
// Generate the device token
val token: Token = fingerprintService.analyze()

// Show the token generated in the view
helloTextView.text = token.bayonetID
} catch (e: Exception) {
println("ERROR ${e}")
}
}
})
}
}
// Generate the device token
val token: Token = fingerprintService.analyze()
```
4 changes: 2 additions & 2 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ tasks.withType(Test) {

group = "com.github.bayonetio"
//version = gitVersion()
version = '0.0.1'
version = '3.0.0'

android {
compileSdk 32

defaultConfig {
minSdk 22
minSdk 21
targetSdk 32

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Expand Down
6 changes: 3 additions & 3 deletions services/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ plugins {
}

configurations.maybeCreate("default")
artifacts.add("default", file('pro-2.2.2.aar'))
artifacts.add("default", file('pro-2.3.1.aar'))

group = 'com.fingerprint.android:pro'
version = '2.2.1'
version = '2.3.1'

afterEvaluate {
publishing {
publications {
maven(MavenPublication) {
groupId = 'com.fingerprint.android.pro'
artifactId = 'fingerprintjs-android'
version = '2.2.1'
version = '2.3.1'
}
}
}
Expand Down
Binary file removed services/pro-2.2.2.aar
Binary file not shown.
Binary file added services/pro-2.3.1.aar
Binary file not shown.

0 comments on commit 14cdf22

Please sign in to comment.