hotchemi / Android-Rate

Android-Rate is a library to help you promote your android app by prompting users to rate the app after using it for a few days.
http://hotchemi.github.io/Android-Rate
MIT License
724 stars 216 forks source link

Crash when using your code #64

Closed kiledar2006 closed 9 years ago

kiledar2006 commented 9 years ago

Dear hotchemi,

i am using your library, i used below mentioned gradle dependency.

compile 'com.github.hotchemi:android-rate:0.5.1'

& i have created a function in my activity like this :-

private void showRate(){ AppRate.with(this) .setInstallDays(0) // default 10, 0 means install day. .setLaunchTimes(10) // default 10 times. .setRemindInterval(2) // default 1 day. .setShowLaterButton(true) // default true. .setDebug(true) // default false. .setOnClickButtonListener(new OnClickButtonListener() { // callback listener. @Override public void onClickButton(int which) { Log.d(WelcomeActivity.class.getName(), Integer.toString(which)); } }) .setTitle(R.string.rate_dialog_title) .setTextLater(R.string.rate_dialog_cancel) .setTextNever(R.string.rate_dialog_no) .setTextRateNow( R.string.rate_dialog_ok ) .monitor();

    AppRate.showRateDialogIfMeetsConditions(this);

}

& i am calling this function from my activity's onCreate method but when i run my activity it is giving me this exception --

java.lang.NullPointerException at hotchemi.android.rate.DialogOptions.getView(DialogOptions.java:84) at hotchemi.android.rate.DialogManager.create(DialogManager.java:25) at hotchemi.android.rate.AppRate.showRateDialog(AppRate.java:161) at hotchemi.android.rate.AppRate.showRateDialogIfMeetsConditions(AppRate.java:136) at com.gootli.app.ui.DestinationsActivity.showRate(DestinationsActivity.java:151)

i am unable to figure out what is the problem, i have taken this code from your sample, pls help me asap.

hotchemi commented 9 years ago

Sorry, I will investigate it.

hotchemi commented 9 years ago

That was my mistake, I'll release fix version soon!

hotchemi commented 9 years ago

@kiledar2006 0.5.2 will be out soon. Thx!