SyntaxFix
Write A Post
Hire A Developer
Questions
Move the long task to a seperate class. Implement it as a subject-observer pattern. Whenever the activity is created register and while closing unregister with the task class. Task class can use AsyncTask.