here Before displaying the dialog check the preferences to get the time that it was last displayed. If it's been more than three days, display the dialog and set a new time in SharedPrefs.
here is my code but it crashed my app , pls tell what i am missing here
long time = sharedPrefs.getLong("displayedTime", 0);
if (time < System.currentTimeMillis() - 259200000) {
displayDialog();
prefsEditor.putLong("displayedTime", System.currentTimeMillis()).commit();
}