You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rate Me is an Android 2.3+ library that shows dialog to suggest the user to rate the application in the Google Play Store.
@@ -13,7 +13,7 @@ How to integrate
13
13
## Eclipse
14
14
15
15
1. Download and extract the ZIP file
16
-
2. Import the sources: File > Import > Existing projects into workspace > Select directory > add LibraryRateMe
16
+
2. Import the sources: File > Import > Existing projects into workspace > Select directory > add `LibraryRateMe`
17
17
3. Add it as a library: Right click on your project > Android > Library: Add > LibraryRateMe
18
18
19
19
## Gradle
@@ -31,67 +31,62 @@ You can see the last version in [Maven Central](http://search.maven.org/#search%
31
31
How to use
32
32
==========
33
33
34
-
The integration is very simple: mimic [this example](https://github.com/androidsx/rate-me/blob/master/SampleProject/src/com/androidsx/rateme/demo1/SampleProject.java) to link the dialog from your own button.
35
-
36
-
When you want to use this library you need choose the icon for your dialg.
34
+
Have a look at [the sample code](https://github.com/androidsx/rate-me/blob/master/SampleProject/src/com/androidsx/rateme/demo1/SampleProject.java) or check out a simple integration:
37
35
38
36
```java
39
-
40
-
.setLogoResourceId(R.drawable.icon)
37
+
newDialogRateMe.Builder(context)
38
+
.setLogoResourceId(R.drawable.ic_launcher)
39
+
.setGoToMail(true)
40
+
.setEmail(getString(R.string.support_email))
41
+
.setShowShareButton(false)
42
+
.build()
43
+
.show(getFragmentManager(), "dialog");
41
44
```
42
45
43
-
If you don´t pass the icon, the library will default the icon that has the name `ic_launcher`.
44
-
45
-
If you use the goToMail Dialog in `true`, you need to configure the company email in `setEmail`
46
-
47
-
You have different options to configure the library and this is a example :
46
+
The full list of options is:
48
47
49
48
```java
50
-
newDialogRateMe.Builder(this)
51
-
.setDialogColor(Color.White)
52
-
.setIconCloseColorFilter(Color.DKGRAY)
53
-
.setLineDividerColor(Color.BLUE)
54
-
.setLogoResourceId(R.drawable.ic_launcher)
55
-
.setRateButtonBackgroundColor(Color.BLUE)
56
-
.setRateButtonPressedBackgroundColor(Color.RED)
57
-
.setRateButtonTextColor(Color.White)
58
-
.setGoToMail(true)
59
-
.setLogoResourceId(R.drawable.icon)
60
-
.setShowOKButtonByDefault(false)
61
-
.setEmail(getString(R.string.support_email))
62
-
.setShowShareButton(false)
63
-
.setTextColor(Color.BLUE)
64
-
.setTitleBackgroundColor(Color.White)
65
-
.setTitleTextColor(Color.BLUE)
66
-
.build()
67
-
.show(getFragmentManager(), "dialog");
49
+
newDialogRateMe.Builder(this)
50
+
.setDialogColor(Color.White)
51
+
.setIconCloseColorFilter(Color.DKGRAY)
52
+
.setLineDividerColor(Color.BLUE)
53
+
.setLogoResourceId(R.drawable.ic_launcher)
54
+
.setRateButtonBackgroundColor(Color.BLUE)
55
+
.setRateButtonPressedBackgroundColor(Color.RED)
56
+
.setRateButtonTextColor(Color.White)
57
+
.setGoToMail(true)
58
+
.setShowOKButtonByDefault(false)
59
+
.setEmail(getString(R.string.support_email))
60
+
.setShowShareButton(false)
61
+
.setTextColor(Color.BLUE)
62
+
.setTitleBackgroundColor(Color.White)
63
+
.setTitleTextColor(Color.BLUE)
64
+
.build()
65
+
.show(getFragmentManager(), "dialog");
68
66
```
69
67
70
-
This Library can be opened automatically by calling the method onStart in our project.
68
+
Dynamic opening of the dialog
69
+
-----
70
+
71
+
In case you want the dialog to appear based on the number of times the app has been opened or the install date, have a look at this example:
71
72
72
73
```java
73
-
@Override
74
-
protectedvoid onStart() {
75
-
super.onStart();
76
-
finalint launchTimes =5;
77
-
finalint installDate =20;
78
-
newRateMeDialogTimer(installDate, launchTimes);
79
-
RateMeDialogTimer.onStart(this);
80
-
if (RateMeDialogTimer.shouldShowRateDialog(this)) {
81
-
AlertMenu();
82
-
}
83
-
84
-
}
85
-
```
74
+
@Override
75
+
protectedvoid onStart() {
76
+
super.onStart();
86
77
87
-
##CustomCriteria
78
+
finalint launchTimes =3;
79
+
finalint installDate =7;
88
80
89
-
The default criteria to show the dialog is as below:
81
+
newRateMeDialogTimer(installDate, launchTimes);
90
82
91
-
* App is launched more than 20 days later than installation.
92
-
* App is launched more than 5 times
83
+
RateMeDialogTimer.onStart(this);
84
+
if (RateMeDialogTimer.shouldShowRateDialog(this)) {
85
+
// show the dialog with the code above
86
+
}
93
87
94
-
you can change this settings [here](https://github.com/androidsx/rate-me/blob/master/SampleProject/src/com/androidsx/rateme/demo1/SampleProject.java)
0 commit comments