I am creating an application,In my app I am getting response and displaing it in custom alert dialog, Till here it works fine, Now what I am trying to do is if user selects
Basically you could check if the value of preferences is stored or not.
you could do this onCreate() method:
Check if preference value exists
if yes:
then no need to make AsyncTask call
and if no:
then make the AsyncTask call
Code:
String statename = preferences.getString("STATE_NAME,"");
if(statename!=""){
//Then directly go inside main activity
}
else{
//Make AsyncTask Call
}