I’m creating as async task in the ActivityB Oncreate().
In that task i’m running a infinite while loop in doInBackground() While i’m moving to previous acitivity and comes again to the activityB, another async task got created.
My Problem is now two infinite while loop is running. Is it possible to stop the async task when i move to previous activity?
Sure… check out isCancelled():