Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How create notification on status bar using phonegap

how to create a notification in the status bar on android as shown below using phonegap?

This is the example of notification that i want. notfication example

like image 552
efenz88 Avatar asked Aug 01 '14 09:08

efenz88


2 Answers

What you need its called "push notifications". PhoneGap has some plugins for that.

  • plugin
  • sample app
  • tutorial

This might also be helpful:

  • Android notifications
  • Cordova local notifications plugin with instructions etc -> here you can see how the plugin is installed and used

Be warned, that using proper push notifications you'll have to register your app first - if your notifications are not only local of course.

To send push notifications, you will need to first register your app with the push notification service (Apple APNs or Google GCM) that corresponds to your app's platform.

like image 115
trainoasis Avatar answered Sep 22 '22 11:09

trainoasis


I know this is old, but to anyone who is still looking, you're probably looking for this: https://github.com/katzer/cordova-plugin-local-notifications

Push notifications allow your phone to receive on-demand notifications. What OP (and what I) was looking for was to actually put something in your notification drawer.

like image 20
itsmichaelwang Avatar answered Sep 20 '22 11:09

itsmichaelwang