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?
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?
You can also use Toast.
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.
Hi
You can use handle
The way is :
in your background class
protected Handler m_Handle = null;
than you finish your task add
m_Handle.sendEmptyMessage(for ex: PopupType );
in your activity
public Handler myHandle = new Handler()
{
@Override
public void handleMessage(Message msg)
{
show dialog
}
}
i think you can do the talk in background using the services then show popup up activity same way that i have did android:chat app popup view
Thank you.