I want to push an activity to background, but the action specified in it should be done.
Is there any way to do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Start a Service from the Activity. Service is the way of telling android that something needs to be run in the background. Activities are meant to be running in the foreground.
Also remember that if you have a very long task to perform, you will need to have a thread that runs in this Service.