My app description goes as: We have a large database, which has lots of data (assume it a google server, which has lot of data about every user). We will process data(useful to our app) in another server and store relevant data in app database. The first page of app shows some processed data from database The problem is that, it is not smart to process every single user data and store in app database because every user will not use our app (say every google user will not use every google applications ).
We were planning that when the user install the app, we will process that particular user's data from main database to app database and shows relevant information. Can somebody guide me through this
I had to face same issue,
I managed it by setting a flag in SharedPreferences
and when next time app comes int to the activity, it checks whether the flag is set or not. If its the first time, it will return false. you can do your codes according to the condition.
//LaunchfirstTimeFlag true, default
if(LaunchfirstTimeFlag) {
LaunchfirstTimeFlag = false;
update in SharedPreferences
// your code
} else{
// your code
}
//SharedPref sample code below.
SharedPreferences preferance = getSharedPreferences(APP_PREFERENCES, MODE_PRIVATE);
SharedPreferences.Editor prefEditor = preferance.edit();
prefEditor.putBoolean("FirstTimeFlag", false);
prefEditor.commit();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With