質問

I would like to know how does Facebook messenger work. I mean, I guess there is a service running in the background, with a broadcast receiver. What really baffles me is that when I receive a message, a circle with the person's profile picture pops up on my home screen.

https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQ7ik8VPHOc1oRK3Vf-LtoZPtSPtdtGZzgecoFsK49HXYiKdMV4

How exactly can I achieve that? Displaying icons to the desktop. (No, I do not want to set shortcuts).

役に立ちましたか?

解決

I have not used the Facebook app, so I might misunderstand what you want to do, but it might be achieavable with a widget?
If you want a more 'dynamic' experience, without needing the user to place the widget, you can use an Intent or a Broadcast to launch a transparent Activity (here is a SO question on transparent activties). This Activity can then display any views you want to show on top on whatever the user currently is viewing (such as the home screen).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top