In my android application,I am getting data from internet and I refresh data in every minute.
So my question is:
When application is minimized, i want to inform the users that new data is available via notifications.
How can i 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.
use
onUserLeaveHint()of Activity` because this method is called when an activity is about to go into the background as the result of user choice like by pressing Home key , menu key,search key or any incoming phone call.So when this method is called then start your service for data notifaction because
onUserLeaveHint()is called when your application is minimized.