I want to show a pop-up message after completing my current task, which is running in the background. The pop-up message must be poped up on current activity.
How i can achieve 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.
You can use either Toast or AlertDialog.
Toast is less intrusive, and cannot take any input, usually best to alert the user of a timer going off or something similar, they disappear by themselves.
AlertDialog is a bit more intrusive since they (usually) don’t go away by them selfs, but they can take input, but from my experience they are best for picking an option like “are you sure you want to exit?” or displaying a loading bar since you can put images and other widgets in them.
But another way would be a Notification.
Although this doesn’t “pop-out” it is another possibility and depending on your app could be a better choice.