Giter VIP home page Giter VIP logo

phonegap-plugin-push's Introduction

DEPRECATED

This project is not under active development. Folks who are users of this plugin should switch to using cordova-plugin-push which is a fork of this project.

phonegap-plugin-push Build Status

Register and receive push notifications

Warning

The links below take you to the version 2.x documentation which includes a number of breaking API changes from version 1.x, mostly the move from GCM to FCM. If you are using version 1.x please reference the docs in the v1.x branch.

What is this?

This plugin offers support to receive and handle native push notifications with a single unified API.

This does not mean you will be able to send a single push message and have it arrive on devices running different operating systems. By default Android uses FCM and iOS uses APNS and their payloads are significantly different. Even if you are using FCM for both Android and iOS there are differences in the payload required for the plugin to work correctly. For Android always put your push payload in the data section of the push notification. For more information on why that is the case read Notification vs Data Payload. For iOS follow the regular FCM documentation.

This plugin does not provide a way to determine which platform you are running on. The best way to do that is use the device.platform property provided by cordova-plugin-device.

Starting with version 2.0.0, this plugin will support CocoaPods installation of the Firebase Cloud Messaging library. More details are available in the Installation documentation.

Do you like tutorial? You get tutorial!

Thanks to all our contributors

10koTVollywaptaxiviktormullerdevgeeksrastafan

mdoelkermarkeeftbmalwattemadebycmkelvinhokkkeab42

jomarocasgiuseppeltericbeKazimclementcontetyaswanthsvist

Vabs28TillaTheHun0tomasvargtobmasterThiagoBuenoszh

SharUpOffsmorstabilinifesorGreyDekartsebastiansierolastor

tanansatpalSandroGrzicicxorxorrubenstolkroel-sluperpataar

peteonrailspjalbuquerqueNitroGhostmatrosov-nikitaMikejo5000michellarcari

adamschachnealhardingalbertleaogotevAlex-Sesslerben-8409

bmwertmanbmattocountcainCookieCooksoncdornercolene

cfsnydercmalarddansumptiondannywillemsDrMoriartyeladmoshe

mlabarcabromeostasisfilmajgeo242gbenvenutipolyn0m

jacquesdevjanpiojakaripurplecabbagetheaccordancejonas-m-

Chuckytuhleonardobazicoloslislo-lshiftluka5mac89markokeeffe

mbektchievgoyaslorberdasergesmdvdsnryanluker

russellbeattierjmunrohanickermwbrooksLightZamlaagland

cuatlgianpajEdMcBanechriswigginsbarryvdharmno

archananaikjakub-gshazronsclement41hung-doanBBosman

giordanocardillomikepsinnAdriVanHoudtalexislg2jcesarmobilenadyaA

jdhiroedewitwildabeastmkuklisashconnellzwacky

rakatyaljtbdevelopmentEddyVerbruggenfredgalvaobobeastmacdonst

larrybahr

phonegap-plugin-push's People

Contributors

adrivanhoudt avatar alexislg2 avatar bbosman avatar bobeast avatar eddyverbruggen avatar edewit avatar erisu avatar fredgalvao avatar giordanocardillo avatar goya avatar hung-doan avatar jakub-g avatar jcesarmobile avatar jdhiro avatar jtbdevelopment avatar knight9999 avatar lightzam avatar macdonst avatar merrygobyebye avatar mikepsinn avatar mkuklis avatar nadyaa avatar purplecabbage avatar sclement41 avatar sgrebnov avatar shazron avatar simon-wicki avatar slorber avatar surajpindoria avatar zacronos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phonegap-plugin-push's Issues

PGB (build.phonegap.com) problem

hi @macdonst
I am using PGB 3.7.1 (build.phonegap.com)
I know your plugin have no wp8 version for now
but it will Indirectly cause wp8 platform build fail
see my screenshot
wp8

iOS badge number

There's no way to update the app icon badge number, like in the previous version with setApplicationIconBadgeNumber?

Android: Notification icon problem

In lollipop, My notification look like this:

In the notification bar, it's a white square (with the old plugin, the same app icon was used here):

screenshot_2015-06-19-13-36-53

Notification bar expanded, a circle with the app icon inside (there's no way make somethinh better, like the other apps?):

screenshot_2015-06-19-13-37-00

Programmatically register

Hi,

I have this switch that lets you "unregister" your device. However, when switched by mistake, switching it back should bring op the "Allow push notifications" alert again. There's no way to do that now.

I'd like to see a "register" function added, so I can register a device programmatically

documentation "senderId" correction

Hi,
currently, there is an error in the documentation:

var push = PushNotification.init({ "android": {"senderId": "12345679"},
"ios": {}, "wp": {"channelName": "12345679"} } );

which cause "No value for senderID" error.

Correction: senderId => senderID

Register method not working

Hi, im trying to register a device trough the register method, following your example, but when i call it, the Xcode logs only shows "Push Plugin register called" but no "Push Plugin register success". Cant get the iOS token and complete a successfully register process. Im trying with and iPAD with iOS 8.1.1 and Xcode 6.3.1

if u could help would be great ;)

Handling multiple notifications on Android devices

Currently, notifications won't stacked in the notification panel, so old notifications replaced by new one. I think "notId" option worth mentioning in the documentation. However, in my point of view stacking notifications is a better approach.

multi-line text support

Looking for the ability to display up to some arbitrary number of multi-line text when previewing from the notification drawer. It looks like gmail has support for at least 3 "lines" of text so we can start there as a base point. however, I'm not sure if this is based on buffer size or a limit on number of characters but either would work just fine here.

This is a follow up to issue 62

Documentation, examples?

Hi, this version on push plugin is very different from the previous one. It would be nice to see examples of working with notifications, for example behavior depending of the platform, when the app is in background and foreground, etc

No default sound in Android

The plugin stopped playing notification sounds after I've updated to version 1.1.1 (I’m not passing custom sound file name in the payload).

Maybe the reason is because of the following commented line in GCMIntentService.java bellow:

 NotificationCompat.Builder mBuilder =
            new NotificationCompat.Builder(context)
                //.setDefaults(defaults)
                .setWhen(System.currentTimeMillis())
                .setContentTitle(extras.getString("title"))
                .setTicker(extras.getString("title"))
                .setContentIntent(contentIntent)
                .setAutoCancel(true);

On Android, GCMIntentService.onError() doesn't get passed to the JavaScript "error" event

Hi, this is a follow-up issue to #54.

I'm using the plugin on a android device:

var push = PushNotification.init({
    "android": { "senderID": "123456789" },
    "ios": {}, "windows": {}
});

push.on('registration', function (data) {
    alert("Token: " + data.registrationId);
});


push.on('error', function (e) {
    alert("Error: " + e.message);
});

When the device sucessfully gets a token for GCM, everything works and the alert is shown.
However when the device cannot get the token, the "error" event on the push object is not raised, so no alert is shown.

When a error occurs, the android logs show this:

D/GCMBaseIntentService( 1895): handleRegistration: registrationId = null, error = AUTHENTICATION_FAILED, unregistered = null
D/GCMBaseIntentService( 1895): Registration error: AUTHENTICATION_FAILED
E/PushPlugin_GCMIntentService( 1895): onError - errorId: AUTHENTICATION_FAILED

GCMIntentService.onError() is called, but this method only has a logging statement, so the implementation to delegate the error to the javascript push.error event seems to be missing:

    @Override
    public void onError(Context context, String errorId) {
        Log.e(LOG_TAG, "onError - errorId: " + errorId);
    }

Thanks!

Does this have the same issue like the original PushPlugin on phonegap-build?

On the PushPlugin, i.e. https://github.com/phonegap-build/PushPlugin, I had a really strange issue on Android Phones. iOS does not have this issue, android does. The issue is as follows:

I used to call the register() function to register with GCM.

var pageHome = {
    pushNotification: window.plugins.pushNotification,
    initPush: function() {
        pageHome.pushNotification.register(pageHome.successHandler, pageHome.errorHandler, {
            "senderID" : "1234567890",
            "ecb" : "pageHome.onNotificationGCM"
        });
    },
    onNotificationGCM: function(e) {
        switch(e.event) {
            case 'registered':
                // Just a random check for the regid.
                if (e.regid.length > 0) {
                    // Get the pushToken from localStorage.
                    var pushToken = localStorage.getItem("pushToken");
                    // Check if the registration has already happened and whether the already stored pushToken is the same as the new registration id (e.regid) coming as a result of re-registration with the GCM server
                    if(pushToken == null || pushToken != e.regid) {
                        // If the device has NOT registered or the device id has changed then only register again.
                        $.ajax({
                            url: 'https://xyz.com/register',
                            type: 'POST',
                            dataType: 'json',
                            data: {regId : e.regid},
                            success: function(data) {
                                // If stored on my own server, then only save it to localStorage.
                                localStorage.setItem("pushToken", e.regid);
                            },
                            error: function(error) {
                            }
                        });
                    }
                }
                break;

            case 'message':
                navigator.notification.alert(e.payload.message, app.alertDismissed, e.payload.title, 'Dismiss');
                break;
        }
    }
}

The problem I have been facing for long is that more than one android device has the same registration id. I mean the registration id is not unique for different devices. Multiple devices have the same registration id. This is quite weird and I have been facing this issue with that plugin. Will this plugin solve this error? Or is this error due to Google GCM servers? In all my apps I have this issue..

Pushes being deleted from notification bar when cold start

I am sending 3 pushes with different notId and when my app is in foreground it receives all 3 pushes, but when it is running in background or it is closed, I receive the 3 pushes on the notification bar, but when I click one of the pushes it gets the app opened and shows the message from the push, but the other 2 messages disappear from the notification bar.

PushNotification not defined

Hi. Using almost the same code in example e got an error message saying that. I got this errro puting a Try before "var push".
The code:
"""
try{
var push = PushNotification.init({
"android": { "senderID": "xxxxx" }
});
}catch(err){
alert("Error: " + err.message);
}
"""
In config XML I've add the lines:
"""
feature name="PushNotification"
param name="android-package" value="com.adobe.phonegap.push.PushPlugin"/
/feature
"""
I'm doing something wrong? Thanks.

Custom notification sound in background mode?

Why I can't the app play a custom sound with the notification when is in background? I'm sending the sound name in the notification...I neither can make this to work in the previous version of the plugin.

I have beep.wav in my www folder. For Android I'm sending 'soundname': 'beep.wav' in the payload, and 'sound': 'beep.wav' for iOS

My code:

App:

var push = PushNotification.init({
    "android": {
        "senderID": "..."//I put here my GCM senrder id
    },
    "ios": {}
});

push.on('registration', function(data) {
    // data.registrationId
    registerNotificationToken(data.registrationId, (window.device.platform == 'android' || device.platform == 'Android') ? 'Android' : 'iOS');
});

push.on('notification', function(data) {
    // data.message,
    // data.title,
    // data.count,
    // data.sound,
    // data.additionalData
    if (isLogedIn()) {

        if (window.device.platform == 'android' || device.platform == 'Android') {

            // if this flag is set, this notification happened while we were in the foreground.
            // you might want to play a sound to get the user's attention, throw up a dialog, etc.
            if ( data.additionalData.foreground )
            {
                var my_media = new Media("/android_asset/www/" + data.sound);
                my_media.play();

                alertify.confirm('<p><strong>' + data.title + '</strong><p/><p>' + data.message + '</p><p>¿Desea verlo?</p>', function () {

                    location.hash = 'available-services\\' + data.additionalData.id;
                });
            }
            // otherwise we were launched because the user touched a notification in the notification tray.
            else {   
                //If app wasn't runing
                if ( e.coldstart ) {

                    serviceId = data.additionalData.id;
                }
                else {

                    location.hash = 'available-services\\' + data.additionalData.id;
                }
            }
        }
        else {

            if ( data.additionalData.alert ) {

                //do something with the push message. This function is fired when push message is received or if user clicks on the tile.
                if (data.additionalData.foreground == 1) {

                    alertify.confirm('<p><strong>' + data.title+ '</strong><p/><p>' + data.message + '</p><p>¿Desea verlo?</p>', function () {

                        location.hash = 'available-services\\' + data.additionalData.id;
                    });
                }
                else {

                    location.hash = 'available-services\\' + data.additionalData.id;
                }
            }

            if ( data.sound ) {

                //play notification sound. Ignore when app is in foreground.
                var snd = new Media(data.sound);
                snd.play();
            }
        }
    }

iOS doesn't add foreground key

Android sets additionalData.foreground: true on notification data when the app is open. This is helpful because background notifications - in most apps - when tapped will go to a route... but if the app is open we will likely alert the user in a different manner instead of route them away from where they are.

Is this not 100% necessary for iOS too? Maybe i'm missing another way to achieve the same thing?

iOS only reads out "aps" payload

Custom payloads that are siblings of aps are allowed by Apple and should be added to message.additionalData. Now only children of aps are allowed.

GCM notifications do not work due to wrong notification payload keys

Hi,

I'm using this plugin in a Cordova App (using Cordova 5.1.1, android-minSdkVersion=15, android-targetSdkVersion=22) in Visual Studio 2015 to send push notifications with a server. WNS and APNS work without a problem, but I coulnd't get GCM on Android to work. I tested it on an Android 4.0.4 and on an Android 5.1 device.
After debugging the plugin, I found that it seems to use the wrong message keys.

My scenario is the following:

  1. When the Cordova app starts and the deviceready handler is called, I register for notifications (using the Google Project number), and on registration I send the registration ID to the server. I also put an alert in the "notification" event handler to verify that a notification has been received (I have obscured IDs etc. in the sample code):
    function onDeviceReady() {
        // Register for notifications.
        var push = PushNotification.init({
            "android": { "senderID": "xxxxx" },
            "ios": {}, "windows": {}
        });

        push.on('registration', function (data) {
            // Send data.registrationId to the server...
        });

        push.on('notification', function (data) {
            alert("Notification: " + data.message)
        });
    };

The "registration" event handler is successfully called and the registration ID is sent to the server. Some time later the server sends a JSON message to the Google GCM service (https://gcm-http.googleapis.com/gcm/send):

{
  "registration_ids": [
    "APA91bHxxxxxxxxxxxxxxxxxx"
  ],
  "notification": {
    "title": "Hi",
    "message": "Hi, this is a Test"
  }
}

GCM then responds with the following JSON:

{
   "multicast_id": xxxxxxxxxx,
   "success": 1,
   "failure": 0,
   "canonical_ids": 1,
   "results": [
      {
         "registration_id": "APA91bFakxxxxxxxxxx",
         "message_id": "0:xxxxxxxxxxxxxx"
      }
   ]
}

So, GCM sucessfully received the message. However no notifications did show on android when the app was in the background, and when it was in the foreground the alert also did not apper.

I then inserted some debug statements in the GCMIntentService.java file and found that it seems to use the wrong keys for GCM message.
private void onMessage(...) contains the following code:

if (extras.getString("message") != null && extras.getString("message").length() != 0) {
    createNotification(context, extras);
}

So it checks for a "message" key. However, after printing extras.toString(), I got the following:

Bundle[{gcm.notification.message=Hi, this is a Test, gcm.notification.title=Hi, collapse_key=do_not_collapse, from=xxxxxxxxxx}]

So, actually the keys are "gcm.notification.message" instead of "message" and "gcm.notification.title" instead of "title". After I replaced extras.getString("message") with extras.getString("gcm.notification.message") etc. in this class and in the PushPlugin class, everything worked - the phone showed the notification in the notification bar.

Any idea why the notification payload fields in the bundle contain the prefix "gcm.notification." which the plugin does not check? I haven't found a similar report though.

Also it seems strange to me that the plugin expects the message text in a "message" field, whereas the GCM Server Reference (https://developers.google.com/cloud-messaging/server-ref#notification-payload-support) specifies that the text should be in a "body" field in the notification payload.

Thanks!

Event not fired when in background

Hello,

I'm developing an iOS app and the notifications appear on the device regularly, problem is the application badge doesn't appear, despite it being in the notification payload. Logging in the lldb console reveals that the function never gets called when in background.

Do I need to set any flag or move the plugin outside the device ready event?

I'm running iOS 7.1 on an iPhone 4.

push sound iOS 9

Hi, i'm creating an app and I'm testing its on iPad with iOS 8 and iPhone with iOS 9. When i accept push notification in iOS 9 sound is not active, infant in push notification setting on iPhone there isn't sound option yes/no for my app, for other app yes. On iPad with iOS 8 sound option there are and i receive sound. Today i update iPad to iOS 9 and sound option disappear so i can't receive sound also on iPad. At this point i think that the problem is with plugin and iOS 9. I hope that someone can help me and all other developer that use this plugin because approximately on 15 settembre iOS 9 became public for everybody.
Thanks

iOS message is lost on cold start

When a PG/Cordova-App is closed and started upon user's activating the PushMessage, this message is not forwarded to Host-App.

It seems that plugin (PushPlugin.m) receives message and only afterwards comes registration from Host-App. So probably because there are still no callbacks registered message gets lost.

In my app PushNotification.init is called on cordova's onDeviceReady event.

The guys from https://github.com/Telerik-Verified-Plugins/PushNotification seem to handle the problem well. The scenario works on their code.

iOS asks for autorisation before init() is called

Immediately after our application starts, the iOS window "X would like to send you push notifications", yet before the init method of the push plugin is called.

We would like to defer the initial demand to be aligned with the call to init so that users are not immediately asked if they want to receive push notifications (research shows that people are less inclined to accept if they don't know what it is for, e.g. http://techcrunch.com/2014/04/04/the-right-way-to-ask-users-for-ios-permissions/)

Not sure to exactly understand how everything is happening in AppDelegate, any idea on this?

JavaScript Notification event not called when app closed/background.

Hi friends,

I am trying to implement is:
When user receives a push notification, I want to make a ajax to server to get additional data for that notification, save them in local database, to display updated info to user when he opens app even when he is offline(later).

Now the issue is:
Notification received event (JavaScript function: push.on('notification', function(data) {});) is invoked only when
- User click on notification from notification bar
- App is open
If app is closed/in background, & user don't click notification from notification bar, the notification receive event (push.on('notification', function(data){};) is not called.

What I need is:
I need JavaScript function be invoked at the same time notification is received regardless of app status (foreground/background/closed) and regardless of user clicks notification.

P.S. I am currently implementing in Android

Thanks

Suggestion: Param to send a silence notification

Hi,

My users ask me an option to silence (no sound nor vibrate) notifications for the next X hours (for example by night or because of a meeting). The notifications should be back to normal (sound + vibrate) after the time limit expire without the user launching the app.

Would it be possible to control sound/vibrate for each notification sent? With params vibrate/silence sent to gcm/apns?

Thanks by advance

Support Win8.1 + Phone 8.1 Universal Apps (WNS), drop support for WP8.0 (MPNS)

Hi,

I found this plugin when searching for a successor of the PushPlugin (https://github.com/phonegap-build/PushPlugin) which seems not to be developed further.

The current readme says that support for "WP8" is under development. However it does not say about the Win 8.1/WP 8.1 (Universal Apps) platform.

As this seems to be a new plugin, what about dropping support for WP 8.0 and instead only supporting Win 8/8.1/WP 8.1 "Universal Apps"? Note that these platforms will use WNS (Windows Notification Service) instead of MPNS (Microsoft Push Notification Service) that was used in WP 8.0 (Note that the Cordova Device Plugin reports an Universal App on WP 8.1 as "windows".

Note that the old PushPlugin (https://github.com/phonegap-build/PushPlugin) does not work on Win 8.1/WP 8.1 in the current Cordova version shipped with VS 2015 RC as it specifies a wrong include file, but I found a fork that fixes this issue: https://github.com/kenwu27/PushPlugin (it worked for me on a Windows Phone 8.1 emulator included in Visual Studio 2015 RC, using a Cordova App).

So you could implement support for Push Notifications on Win 8/8.1/WP 8.1 using WNS based on that implementation.

Thanks!

Multiple push notification problem

When there are more than one notification in status bar (different notIds), tapping on any of then will open the last received (Android only).

Closed App is not getting Push Data after initialization

Hi,
i just found a usability issue.

If the User is exiting the App and getting a Push afterwards, the PushPlugin is still registering the Push but is not returning the Data to the App.

Aug 5 09:04:04 Tims-iPhone6 OK[7443] : Notification received
Aug 5 09:04:04 Tims-iPhone6 OK[7443] : Push Plugin key: alert
Aug 5 09:04:04 Tims-iPhone6 OK[7443] : Invalid callback id received by sendPluginResult

It would be great, to read PushData received after the initalization of the App.

Thanks for your work on this plugin! :)

Best,
Tim

register question

do i need to call PushNotification.init every time that app is opening ?

it seems init method will register GCM token every time

iOS only receives first notification in foreground

Sending a push notification only calls on('notification') once, while the app is in the foreground.

To reproduce:

  • add a console.log to the on('notification') callback
  • deploy to device and leave the app in the foreground
  • send it a push notification
  • XCode logs native Push Plugin key: alert etc
  • on('notification') callback is fired and outputs to log
  • send another push notification
  • xcode still logs native Push Plugin key: alert etc
  • on('notification') doesn't get fired

Add support for reporting location to server URL when specific GCM/APN arrives

Hi,
I have code that adds the following functionality (as of now just on android):
Upon a GCM with REPORT_LOCATION in a certain field, the client sends its current location via http request to a predetermined endpoint (without bothering the user).
(It can't be done from javascript because the app is not always active)
This is useful when the server needs accurate client location in a specific time, but periodically updating the server costs precious battery.

Does this sound like something you'd like to incorporate?
Is this plugin currently up and and working?

Error trying to remove the plugin

This happen when I try to remove the plugin from my app (I think you miss to rename some things, the cli is looking at com.phonegap.plugins.PushPlugin, when the plugin folder is called phonegap-plugin-push)

E:\LocalDocs\Iridian\PilotoAutomatico\PilotoAutomaticoConductoresCLI>cordova plu
gin rm phonegap-plugin-push
Uninstalling phonegap-plugin-push from android
Removing "phonegap-plugin-push"
Error: ENOENT, no such file or directory 'E:\LocalDocs\Iridian\PilotoAutomatico
PilotoAutomaticoConductoresCLI\plugins\com.phonegap.plugins.PushPlugin\plugin.xm
l'
at Object.fs.openSync (fs.js:438:18)
at Object.fs.readFileSync (fs.js:289:15)
at Object.module.exports.parseElementtreeSync (C:\Users\DELL\AppData\Roaming
\npm\node_modules\cordova\node_modules\cordova-lib\src\util\xml-helpers.js:118:2
7)
at new PluginInfo (C:\Users\DELL\AppData\Roaming\npm\node_modules\cordova\no
de_modules\cordova-lib\src\PluginInfo.js:320:37)
at PluginInfoProvider.get (C:\Users\DELL\AppData\Roaming\npm\node_modules\co
rdova\node_modules\cordova-lib\src\PluginInfoProvider.js:35:32)
at C:\Users\DELL\AppData\Roaming\npm\node_modules\cordova\node_modules\cordo
va-lib\src\plugman\util\dependencies.js:42:49
at Array.forEach (native)
at Object.module.exports.package.generateDependencyInfo (C:\Users\DELL\AppDa
ta\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\util\de
pendencies.js:38:45)
at C:\Users\DELL\AppData\Roaming\npm\node_modules\cordova\node_modules\cordo
va-lib\src\plugman\uninstall.js:166:37
at Array.forEach (native)

"Actionable" Notification Buttons

Greetings - Thank you @macdonst for all of your work with PhoneGap. We currently use your videoplayer plugin for Powerline. Good stuff!

Anyway, we are looking for the ability to add buttons to a notification similar to how GMail allows you to View or Reply to an e-mail when you're looking at the preview in the OS notification drawer (see image below). Your Push plugin has all the other features we're looking for (remote loaded large icon, small icon overlay, title, message, sound, badge, etc.), but it doesn't have multi-line text support (again, think previewing a gmail message) or this button concept.

Is that on your roadmap at all? Do you know if anyone is currently working on that? Hope this is the right place for this question!

Thanks,
Jesse

gmail-notifications

Cannot register on iOS

I've tried the code below on two different iPhone running iOS 8.4 and the error callback is always called twice, with the value being constantly {}.

The code runs after deviceready is fired, and works fine on Android.

var plugin = PushNotification.init({ "android": {"senderID": "XX"},
                       "ios": {'badge': true, 'sound': true, 'alert': true}});

plugin.on('registration', function (data) {
  alert("Registration: " + JSON.stringify(data));
});

plugin.on('notification', function (data) {
  alert("Notification: " + JSON.stringify(data));
});

plugin.on('error', function (e) {
  alert("Error: " + JSON.stringify(e));
 });

Any idea what could possibly be wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.