I would like to display an alertdialog from a Service even if the user is not currently on my app.
I read on the web that we necessarily need to create another activity with a "Popup theme"...
So also tried this : how to create alertdialog outside of an application?
But it always open my app before showing the new activity.
I am sure there is another solution. What does Facebook messenger use to show some notifs when new message received?
Thanks
EDIT
I just found that: http://www.piwai.info/chatheads-basics/
Let's try it!
EDIT 2
Okay, I tested the trick in my previous edit. It can be a solution, but it is not very clean... I mean, some developers use this to show ads to the user, it can be intrusive, and I need to add a permission which warn at the install time. I finally decided to open my app and display my AlertDialog in my app.
EDIT 3
I solved my problem. See my answer for more information