Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Google Playstore Rate This App Dialog Prompt #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .idea/aadhaar-offline-android-sdk_7.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions AadhaarOfflineSDKClient/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies {

implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.github.hotchemi:android-rate:1.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public void onClick(View v) {
aadhaarOfflineStartCallback, aadhaarOfflineEventsCallback);
}
});
setUpRateApp();
}

private HVAadhaarOfflineConfig buildConfig() {
Expand All @@ -94,4 +95,23 @@ private HVAadhaarOfflineConfig buildConfig() {
.offlineKycApi("https://hv-aadhaar-xml.hyperverge.co/v2.1/readAadhaarXml")
.build();
}

private setUpRateApp() {
AppRate.with(this)
.setInstallDays(7) // Specifies the number of days after installation, the dialog popup shows.
.setLaunchTimes(2) // Specifies the number of times the app must launch by user for the dialog popup to show.
.setRemindInterval(3) // Specifies the number of days after "Remind Me Later" is clicked, the dialog popup will show.
.setShowLaterButton(true)
.setDebug(false) // IMPORTANT: Set true only for testing purposes. DO NOT set true for release-app.
.setOnClickButtonListener {
// Space to alter the entire functionality of the "dialog popup" for future purposes.
}
.monitor();

//To show the dialog popup only if meets ALL specified conditions.

//To show the dialog popup only if meets ALL specified conditions.
AppRate.showRateDialogIfMeetsConditions(this);
}

}