Skip to content
This repository was archived by the owner on May 22, 2021. It is now read-only.

Commit 0abfb69

Browse files
committed
Reverted method name back to app_launched
1 parent be6b38d commit 0abfb69

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

AppRater/src/main/java/org/codechimp/apprater/AppRater.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ public static void setCancelable(boolean cancelable) {
101101
*
102102
* @param context
103103
*/
104-
public static void init(Context context) {
105-
init(context, DAYS_UNTIL_PROMPT, LAUNCHES_UNTIL_PROMPT);
104+
public static void app_launched(Context context) {
105+
app_launched(context, DAYS_UNTIL_PROMPT, LAUNCHES_UNTIL_PROMPT);
106106
}
107107

108108
/**
@@ -117,10 +117,10 @@ public static void init(Context context) {
117117
* @param daysForRemind
118118
* @param launchesForRemind
119119
*/
120-
public static void init(Context context, int daysUntilPrompt, int launchesUntilPrompt, int daysForRemind, int launchesForRemind) {
120+
public static void app_launched(Context context, int daysUntilPrompt, int launchesUntilPrompt, int daysForRemind, int launchesForRemind) {
121121
setNumDaysForRemindLater(daysForRemind);
122122
setNumLaunchesForRemindLater(launchesForRemind);
123-
init(context, daysUntilPrompt, launchesUntilPrompt);
123+
app_launched(context, daysUntilPrompt, launchesUntilPrompt);
124124
}
125125

126126
/**
@@ -131,7 +131,7 @@ public static void init(Context context, int daysUntilPrompt, int launchesUntilP
131131
* @param daysUntilPrompt
132132
* @param launchesUntilPrompt
133133
*/
134-
public static void init(Context context, int daysUntilPrompt, int launchesUntilPrompt) {
134+
public static void app_launched(Context context, int daysUntilPrompt, int launchesUntilPrompt) {
135135
SharedPreferences prefs = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
136136
SharedPreferences.Editor editor = prefs.edit();
137137
ApplicationRatingInfo ratingInfo = ApplicationRatingInfo.createApplicationInfo(context);

AppRaterDemo/src/main/java/org/codechimp/appraterdemo/MainActivity.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void onClick(View v) {
3333
});
3434

3535

36-
// Optionally you can set the Market you want to use prior to calling init
36+
// Optionally you can set the Market you want to use prior to calling app_launched
3737
// If setMarket not called it will default to Google Play
3838
// Current implementations are Google Play and Amazon App Store, you can add your own by implementing Market
3939
// AppRater.setMarket(new GoogleMarket());
@@ -43,9 +43,7 @@ public void onClick(View v) {
4343
// It should be the default implementation of AppRater
4444

4545
AppRater.setPackageName("com.johncrossley");
46-
AppRater.setNumDaysForRemindLater(7);
47-
AppRater.setNumLaunchesForRemindLater(7);
48-
AppRater.init(this);
46+
AppRater.app_launched(this);
4947
}
5048

5149
@Override

0 commit comments

Comments
 (0)