Source:
private static void showRateDialog(final Context context, AlertDialog.Builder builder) { int titleId = sConfig.mTitleId != 0 ? sConfig.mTitleId : R.string.rta_dialog_title; int messageId = sConfig.mMessageId != 0 ? sConfig.mMessageId : R.string.rta_dialog_message; int CancelButtonID = sConfig.CancelButton != 0 ? sConfig.CancelButton : R.string.rta_dialog_cancel; int ThanksButtonID = sConfig.ThanksButton != 0 ? sConfig.ThanksButton : R.string.rta_dialog_no; int RateButtonID = sConfig.RateButton != 0 ? sConfig.RateButton : R.string.rta_dialog_message; builder.setTitle(titleId); builder.setMessage(messageId); builder.setPositiveButton(RateButtonID, new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { if (sCallback != null) { sCallback.onYesClicked(); } String appPackage = context.getPackageName(); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("<LINK_0>" + appPackage)); context.startActivity(intent); setOptOut(context, true); } }); builder.setNeutralButton(CancelButtonID, new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { if (sCallback != null) { sCallback.onCancelClicked(); } clearSharedPreferences(context); } }); builder.setNegativeButton(ThanksButtonID, new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { if (sCallback != null) { sCallback.onNoClicked(); } setOptOut(context, true); } }); builder.setOnCancelListener(new OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { clearSharedPreferences(context); } }); builder.create().show(); }

Target:
private static void showRateDialog(final Context context, AlertDialog.Builder builder) { int titleId = sConfig.mTitleId != 0 ? sConfig.mTitleId : R.string.rta_dialog_title; int messageId = sConfig.mMessageId != 0 ? sConfig.mMessageId : R.string.rta_dialog_message; int cancelButtonID = sConfig.mCancelButton != 0 ? sConfig.mCancelButton : R.string.rta_dialog_cancel; int thanksButtonID = sConfig.mThanksButton != 0 ? sConfig.mThanksButton : R.string.rta_dialog_no; int rateButtonID = sConfig.mRateButton != 0 ? sConfig.mRateButton : R.string.rta_dialog_ok; builder.setTitle(titleId); builder.setMessage(messageId); builder.setPositiveButton(rateButtonID, new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { if (sCallback != null) { sCallback.onYesClicked(); } String appPackage = context.getPackageName(); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("<LINK_0>" + appPackage)); context.startActivity(intent); setOptOut(context, true); } }); builder.setNeutralButton(cancelButtonID, new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { if (sCallback != null) { sCallback.onCancelClicked(); } clearSharedPreferences(context); } }); builder.setNegativeButton(thanksButtonID, new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { if (sCallback != null) { sCallback.onNoClicked(); } setOptOut(context, true); } }); builder.setOnCancelListener(new OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { clearSharedPreferences(context); } }); builder.create().show(); }