Skip to content

Commit

Permalink
Release 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersantos committed Mar 19, 2017
1 parent ae6fffb commit b0b7f17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ And add the library to your module **build.gradle**:

```Javascript
dependencies {
compile 'com.github.javiersantos:PiracyChecker:1.0.1'
compile 'com.github.javiersantos:PiracyChecker:1.0.2'
}
```

Expand Down Expand Up @@ -59,6 +59,8 @@ new PiracyChecker(this)

In order to retrieve your BASE64 license key your app must be uploaded to the [Google Play Developer Console](https://play.google.com/apps/publish/). Then access to your app -> Services and APIs.

When using Google Play Licensing your should call `.destroy()` in the `onDestroy()` method of your Activity to avoid multiple instances of the service running. Have a look to the Wiki for a [sample Activity](https://github.com/javiersantos/PiracyChecker/wiki/Using-Google-Play-Licensing-(LVL)) with `.destroy()`.

### Verify your app's signing certificate (signature)
In a nutshell, developers must sign applications with their private key/certificate (contained in a .keystore file) before the app can be installed on user devices. The signing certificate must stay consistent throughout the life of the app, and typically have an expiry date of 25 years in the future.

Expand Down Expand Up @@ -115,7 +117,7 @@ Define the `SharedPreferences` and the name of the preference where you want to
```Java
new PiracyChecker(this)
.enableUnauthorizedAppsCheck()
.blockIfUnauthorizedAppDetected(preferences, "app_unauthorized") // Change "app_unauthorized" with your own value
.blockIfUnauthorizedAppUninstalled(preferences, "app_unauthorized") // Change "app_unauthorized" with your own value
...
.start();
```
Expand All @@ -125,7 +127,7 @@ Define the `SharedPreferences` name and the name of the preference where you wan
```Java
new PiracyChecker(this)
.enableUnauthorizedAppsCheck()
.blockIfUnauthorizedAppDetected("license_preferences", "app_unauthorized") // Change "license_preferences" and "app_unauthorized" with your own value
.blockIfUnauthorizedAppUninstalled("license_preferences", "app_unauthorized") // Change "license_preferences" and "app_unauthorized" with your own value
...
.start();
```
Expand Down Expand Up @@ -202,6 +204,8 @@ new PiracyChecker(this)
.start();
```

By default, the displayed Activity will use the library colors. To apply a custom primary and primary dark color use `.withActivityColor(R.color.colorPrimary, R.color.colorPrimaryDark)`.

### Using custom callbacks
Adding a callback to the builder allows you to customize what will happen when the license has been checked and manage the license check errors if the user is not allowed to use the app. Keep in mind that when using this method **you must be aware of blocking the app from unauthorized users**.

Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
consumerProguardFiles 'proguard-rules.pro'
minSdkVersion 9
targetSdkVersion 25
versionCode 4
versionName "1.0"
versionCode 6
versionName "1.0.2"
}
buildTypes {
release {
Expand Down

0 comments on commit b0b7f17

Please sign in to comment.