How to show dialog box once in a three days in application
<p>Here is my code it is working please tell me code button for "no thanks" if user tap on this button then dialog box never show at all </p>

<pre><code> public class MainActivity extends Activity {


    Button btnRegId;
    EditText etRegId;
    String regID;

    GoogleCloudMessaging gcm;
    String regid,url;

    //String PROJECT_NUMBER = "90787073097";
    String PROJECT_NUMBER =  "440085976573";


    String android_id,version,ver;


ImageView mega4,todayTips,latstnews,sportquiz,tipister;

TextView txtname;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

  // etRegId = (EditText) findViewById(R.id.edtvID);




    //********************For Rating APP **********************
     SharedPreferences sharedPrefs = MainActivity.this.getSharedPreferences("RATER", 0);

     SharedPreferences.Editor prefsEditor = sharedPrefs.edit();

    long time = sharedPrefs.getLong("displayedTime", 0);
    if (time &lt; System.currentTimeMillis() - 259200000) {
       displayDialog();
       prefsEditor.putLong("displayedTime", System.currentTimeMillis()).commit();
    }
 }

   //dialog box Function for rating app.

private void displayDialog() {
    // TODO Auto-generated method stub
      DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
            switch (which){
            case DialogInterface.BUTTON_POSITIVE:
                //Yes button clicked
                   Intent in = new Intent(android.content.Intent.ACTION_VIEW);
                   in.setData(Uri.parse(url));
                   startActivity(in);
                break;

            case DialogInterface.BUTTON_NEGATIVE:
                //No button clicked
                break;
            }
        }
    };

    AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
    builder.setTitle("Rate This App");
    builder.setMessage("You really seem to like this app, "
              +"since you have already used it %totalLaunchCount% times! "
              +"It would be great if you took a moment to rate it.")
    .setPositiveButton("Rate Now", dialogClickListener)
        .setNegativeButton("Latter", dialogClickListener)
        .setNeutralButton("No,thanks", dialogClickListener).show();

   }
   //End dialog box Function for rating app.
  }
</code></pre>

<p>Here is my code actually i want to implement app rating dialog box in application that should display once in three day</p>