I have two differents methods that are executed on onCreate() and onResume(), but I want that when onCreate() is executed, the method in onResume don't run. Have some way to achieve this?
--EDIT--
I removed the piece of code from onCreate(), and created a flag to interact with onPause() and passed the boolean flag as params:
Boolean flagFirstTime = true;
@Override
public void onResume()
{
super.onResume();
new asyncTask().execute(flagFirstTime);
}
@Override
protected void onPause() {
super.onPause();
flagFirstTime = false;
}
Before I asked, I was thinking put a flag, but in my opinion, this is very ugly. XD