& 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.
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();
}
& 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.