Is there any local notification in Android?

别来无恙 提交于 2020-01-03 04:25:12

问题


In my application I want to use the Local Notification. I don't know is there any local notification available in Android or not.

If yes then please give me any sample example to implement it.

Thanks.


回答1:


Android doesn't really have a distinction between remote (push in Apple terms) and local notifications. You don't get a box pop up or any UI at all for free with Android's C2DM.

I think you just want to look at:

  • http://developer.android.com/guide/topics/ui/notifiers/notifications.html
  • http://developer.android.com/guide/topics/ui/notifiers/toasts.html

For doing something at a certain time you want to look at:

  • http://developer.android.com/reference/android/app/AlarmManager.html



回答2:


there is a sample of new Notification with PendingIntent for call Activity when the user click on.

PendingIntent of Notification don't call my Activity second time




回答3:


yes, there are local notifications in android. To understand how to work with them see this answer - How schedule local notifications Android?



来源:https://stackoverflow.com/questions/8590640/is-there-any-local-notification-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!