I am using a library to rate my app and there is a function called .setInstallDays(n) that is called OnCreate method and it recieves a number as argument so that a rate dialog will be shown after the n days of installs. It is working ok, but I would want to set that n number as a random number in a range of numbers. The problem is that I have thought that maybe if it is generated OnCreate method it could generate one different number so that the n will change everytime the Activity is created. How could I generate only one random number so that it is only generated once so that I can use that random number in the .setInstallDays(n) function?
This is the library I am using:AndroidRateHotchemi
This is the code that I have already:
 @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.my_activity);
        AppRate.with(this)
                .setInstallDays(4) // default 10, 0 means install day.
                .monitor();
        AppRate.showRateDialogIfMeetsConditions(this);
}
 
     
    