GithubHelp home page GithubHelp logo

phonegap-build / pushplugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bobeast/pushplugin-deprecated

1.3K 93.0 999.0 10.97 MB

This repository is deprecated head to phonegap/phonegap-push-plugin

Home Page: https://github.com/phonegap/phonegap-plugin-push

License: MIT License

JavaScript 57.56% Ruby 0.36% CSS 3.16% Java 20.78% Objective-C 8.91% C# 4.62% HTML 4.61%

pushplugin's People

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

pushplugin's Issues

Unregister Issue

Hi guys,
i'm using your plugin and it works like a charm. There is just one issue. If i unregistered a device and i send notification to that unregistered id it can receive message anyway. there is just my issue or there is no unregistration on gcm?

there is no way unregister old registered id? my issue is that i receive a message for every id for every push notification i send.

Thank you for you help.
Regards

using with phonegap build - not working

Hi,
I am trying to use the plugin via phonegap build.
I have added the <script> reference to the html, and the PushNotification.js itself, and when the "register" function is called, nothing happens..
I would expect the successHandler or errorHandler to be fired, and show an alert, but nothing happens, and the try-catch doesn't catch nothing..

please help..

Phonegap v3.x

Is it possible to use the plugin with phongap v3.x (yet)?

I could'nt get it running, the readme.md seems not to be very helpful here.

Should I use plugman? or does the plugin need upgrading for use via the new node based cli tools? ("cordova plugin add ...")

Tested only on Android yet (phonegap 3.0 on a mac, followed manual install, using cordova-3.0.0.jar)

"adb logcat" output:

W/PluginManager(31200): THREAD WARNING: exec() call to PushPlugin.register 
blocked the main thread for 30ms. Plugin should use 
CordovaInterface.getThreadPool().

Cheers,
Michael

manual copy of *.m / *.h files ?

I had to do this:

cp plugins/PushPlugin-1.3.3/src/ios/* platforms/ios/CordovaTest/Plugins/

was expecting the "cordova plugin add...." would do that for me

Handle Application Start due to Remote Notification Case on iOS

On iOS, this plugin handles the case when application is inactive or in active state and a remote notification is received. However, when application is not running and a remote notification arrives and user clicks the alert/banner, the application launches but PushPlugin does nothing - it should propagate the notification from native(objective C) to Javascript/HTML.

Error: grafting xml at selector "plugins" - Phonegap 3.0

The plugman install method for 3.0 fails to insert xml into the AndroidManifest.xml and Config.xml files. Cordova also fails to insert the xml if I use the new CLI install method to add the plugin to the /plugins folder and allow phonegap to auto-load it on build. I couldn't get it to work after tinkering with the plugin.xml file, so maybe something else is going on with the new version?

I also can't get it to work using the manual instructions instead of the automatic build, but I don't think you can do that any more with the new version, anyway.

Can't get the registration id Android

I'd like to have the registration id when I'm using register but I just got this:

09-14 12:35:36.115: V/PushPlugin(14078): execute: action=register
09-14 12:35:36.115: V/PushPlugin(14078): execute: data=[{"senderID":"My Sender Id","ecb":"onNotificationGCM"}]
09-14 12:35:36.115: V/PushPlugin(14078): execute: jo={"senderID":"My Sender Id","ecb":"onNotificationGCM"}
09-14 12:35:36.115: V/PushPlugin(14078): execute: ECB=onNotificationGCM senderID=My Sender Id

I had a look to the java code and I think that I need a gCachedExtras not null to get my sender id, but gCachedExtras is always null.

And the onRegistered in the GCMIntentService is not used too

Thanks for your help

files in wrong folders?

i had to move 'PushPlugin.java' and 'PushHandlerActivity.java' from GCM to gcm to get this to work. Capitalization matter in file names on most systems.

registration error , invalid sender ?

06-20 16:54:03.126: V/GCMBaseIntentService(1313): Intent service name: GCMIntentService-GCMIntentService-3
06-20 16:54:03.136: V/GCMRegistrar(1313): Registering receiver
06-20 16:54:03.136: D/GCMBaseIntentService(1313): handleRegistration: registrationId = null, error = INVALID_SENDER, unregistered = null
06-20 16:54:03.136: D/GCMBaseIntentService(1313): Registration error: INVALID_SENDER
06-20 16:54:03.136: E/GCMIntentService(1313): onError - errorId: INVALID_SENDER
06-20 16:54:03.136: V/GCMBaseIntentService(1313): Releasing wakelock

this error come when i using this plugin , now i am testing with emulator installed necessary sdks,

showing registrationId = null , i also create a projectid on google api in GCM.

if anyone can help me then solv my problem?

If I do NOT register the app every time it loads then the push notification flow is broken

Hi,

I don't understand why I have to call "pushNotification.register(...)" every time the app initializes. IMHO after a successful registration I can save (persist) the regid and re-use it every time the app loads. This eliminating the need to register over and over again.

Unfortunately, if I try to do this then the push notification flow is broken :-(
This happens because the PushPlugin.java class initializes "gECB" and "gWebView" fields only when "pushNotification.register(...)" is called.
Because I save the regid and do not call the register method, then these class fields remain null which causes methods like "sendExtras(Bundle extras)" and "sendJavascript(JSONObject _json)" not to work!

Any insights on this matter will be appreciated :-)
Thanks in advance,
Amit

Dont build using cordova build to Iphone or Android

I install the plugin using "cordova plugin add https://github.com/phonegap-build/PushPlugin", i need to add to config.xml to android and ios project (issue of cordova-cli), later of install i make a "cordova build but throw this error":

IOS:

/Users/jrqb182/Repositories/tmp2/platforms/ios/HelloCordova/Plugins/com.adobe.plugins.PushPlugin/AppDelegate+notification.m:116:6: error: ARC forbids explicit message send of 'dealloc'

ANDROID:

-compile:
[javac] Compiling 8 source files to /Users/jrqb182/Repositories/tmp2/platforms/android/bin/classes
[javac] /Users/jrqb182/Repositories/tmp2/platforms/android/src/com/plugin/gcm/PushPlugin.java:14: package org.apache.cordova.api does not exist
[javac] import org.apache.cordova.api.CallbackContext;
[javac] ^
[javac] /Users/jrqb182/Repositories/tmp2/platforms/android/src/com/plugin/gcm/PushPlugin.java:15: package org.apache.cordova.api does not exist
[javac] import org.apache.cordova.api.CordovaPlugin;
[javac] ^
[javac] /Users/jrqb182/Repositories/tmp2/platforms/android/src/com/plugin/gcm/PushPlugin.java:23: cannot find symbol
[javac] symbol: class CordovaPlugin
[javac] public class PushPlugin extends CordovaPlugin {
[javac] ^
[javac] /Users/jrqb182/Repositories/tmp2/platforms/android/src/com/plugin/gcm/PushPlugin.java:44: cannot find symbol
[javac] symbol : class CallbackContext
[javac] location: class com.plugin.gcm.PushPlugin
[javac] public boolean execute(String action, JSONArray data, CallbackContext callbackContext) {
[javac] ^
[javac] /Users/jrqb182/Repositories/tmp2/platforms/android/src/com/plugin/gcm/PushPlugin.java:40: cannot find symbol
[javac] symbol : variable cordova
[javac] location: class com.plugin.gcm.PushPlugin
[javac] return this.cordova.getActivity().getApplicationContext();
[javac] ^
[javac] /Users/jrqb182/Repositories/tmp2/platforms/android/src/com/plugin/gcm/PushPlugin.java:57: cannot find symbol
[javac] symbol : variable webView
[javac] location: class com.plugin.gcm.PushPlugin
[javac] gWebView = this.webView;
[javac] ^
[javac] /Users/jrqb182/Repositories/tmp2/platforms/android/src/com/plugin/gcm/PushPlugin.java:43: method does not override or implement a method from a supertype
[javac] @OverRide
[javac] ^
[javac] /Users/jrqb182/Repositories/tmp2/platforms/android/src/com/plugin/gcm/PushPlugin.java:214: cannot find symbol
[javac] symbol : variable super
[javac] location: class com.plugin.gcm.PushPlugin
[javac] super.onDestroy();
[javac] ^
[javac] 8 errors

Don't ask for GET_TASKS permission

This PR is bad:
#3

The problem is that https://github.com/phonegap-build/PushPlugin/blob/master/src/android/com/plugin/gcm/GCMIntentService.java#L150 is using getRunningTasks() to determine if the app is in the foreground. This is explicitly discouraged as being unreliable, as well as requiring a permission that only some sort of task manager or very intrusive spyware would actually really need:
http://stackoverflow.com/questions/3667022/android-is-application-running-in-background/5862048#5862048

Galaxy android 4.1.2 only gets one notification

When resetting cache and all the app gets yet another one - works perfect on ios.

But otherwise unreliable on android: Seems the app works after a remove and reinstall - then it gets notifications. (except for android 4.1.2 only gets one)

I'm near a deadline, and about ready to jump into the android code - any guidance?

Hook-up "error" event to ecb callback

If there is a registration failure on Android, onError/onRecoverableError methods are invoked. These method need to be implemented to send JS callback to ECB with "event" being "error".

Implementing offline push notifications

For when wanting to get the information of the push notification in your app, for example to display a message

I'm not implementing pull request because I know that the way I hacked the notificationRecived probably can be made better. I have zero knowledge on C#

in appDelegate.m --> - (BOOL)application:(UIApplication_)application didFinishLaunchingWithOptions:(NSDictionary_)launchOptions

    if (launchOptions != nil)
    {
        NSDictionary* dictionary = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
        NSLog(@"Launched from push notification: %@" , dictionary);
        if (dictionary != nil)
        {
            // get the necessary information out of the dictionary
            // (the data you sent with your push message)
            // and load your data
            PushPlugin *pushHandler = [self.viewController getCommandInstance:@"PushPlugin"];
            pushHandler.notificationMessage = dictionary;
            pushHandler.isInline = YES;
            [pushHandler notificationReceived];

        }
    }

This will call the plugin.

PushPlugin.m --> - (void)notificationReceived

- (void)notificationReceived {

    if (notificationMessage) {

        NSString *exists = [self.webView stringByEvaluatingJavaScriptFromString:@"isLoaded()"];
        NSString *MyTrue = @"true";

        if ([MyTrue isEqualToString:exists]) {
            NSLog(@"Notification received isNotLoading");

            NSMutableString *jsonStr = [NSMutableString stringWithString:@"{"];

            [self parseDictionary:notificationMessage intoJSON:jsonStr];

            if (isInline) {
                [jsonStr appendFormat:@"foreground:'%d',", 1];
                isInline = NO;
            }

            [jsonStr appendString:@"}"];

            NSLog(@"Msg: %@", jsonStr);

            NSString * jsCallBack = [NSString stringWithFormat:@"%@(%@);", self.callback, jsonStr];

            [self.webView stringByEvaluatingJavaScriptFromString:jsCallBack];

            self.notificationMessage = nil;

        } else {
            NSLog(@"Notification received isLoading");
            [NSTimer scheduledTimerWithTimeInterval: 5 target: self selector: @selector(notificationReceived) userInfo: nil repeats: NO];
        }        
    }
}

I try to see if the webview is available, if not I loop, if someone has a better idea please do tell!

In my javascript

var loaded = "false";

function isLoaded () {
    return loaded;
}

$(document).ready(function () {
    loaded = "true";
});

I use $(document).ready because I use jquery and I want to check that jquery is working!

Hope this helps someone!

Adding getApplicationIconBadgeNumber

I'm wondering if anyone has thought about adding a getApplicationIconBadgeNumber method to PushNotification.js? I think this would be a good addition to PushPlugin. It would give the ability to check if there were any notifications missed while the app was suspended or closed.

Why would I want to unregister?

The documentation is a bit unclear on why I should unregister? Is'nt the whole point of push notifications that the server should be able to notify the user at any time? If I unregister on app exit then the user would only receive notifications while he's using the app?

Reference Error for errorCallback in function setApplicationIconBadgeNumber

Using Phonegap Build 2.5.0 (having debug issues with 2.7.0 and IOS).

When pushNotification.setApplicationIconBadgeNumber(successHandler, e.badge);
is called a reference error for errorCallback occurs. Looking at PushNotification.js not sure if errorCallback should have been a passed in parameter.

Unable to try any fix as Phonegap Build auto includes PushNotification.js

ERROR: Plugin 'PushPlugin' not found, or is not a CDVPlugin

When testing on android works perfect, but when testing on an iPhone device or Simulator the plugin does not work and I get this error log:

2013-09-12 10:46:31.972 MyApp[7261:907] Multi-tasking -> Device: YES, App: YES
2013-09-12 10:46:32.163 MyApp[7261:907] active
2013-09-12 10:46:32.547 MyApp[7261:907] Resetting plugins due to page load.
2013-09-12 10:46:32.842 MyApp[7261:907] DEPRECATION NOTICE: The Connection ReachableViaWWAN return value of '2g' is deprecated as of Cordova version 2.6.0 and will be changed to 'cellular' in a future release.
2013-09-12 10:46:32.912 MyApp[7261:907] console, device.platform: iOS
2013-09-12 10:46:32.913 MyApp[7261:907] ERROR: Plugin 'PushPlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2013-09-12 10:46:32.914 MyApp[7261:907] -[CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [
"PushPlugin692037132",
"PushPlugin",
"register",
[
{
"alert" : "true",
"ecb" : "onNotificationAPN",
"sound" : "true",
"badge" : "true"
}
]
]
2013-09-12 10:46:32.927 MyApp[7261:907] Finished load of: file:///var/mobile/Applications/12D7B223-779E-44F1-9785-FFE103B995E0/MyApp.app/www/index.html

I have followed all the steps for the manual install, and all ios plugin files are in the plugin folder and referenced to the project.

I just noticed there is an xcode confix.xml file and I am not sure if I need to add the plugin line to this file as the tutorial is not clear about this.

I have generated my ios plarform code with cordova 2.9.0.

Thanks in advance if anyone can help me on what I am doing wrong.

Can't receive my reg ID and didn't show me any Error

Hi,

I installed PushPlugin in fresh project but I get this messages :

09-30 15:50:36.119: V/PushPlugin(982): execute: action=register
09-30 15:50:36.130: V/PushPlugin(982): execute: data=[{"senderID":"85546438302","ecb":"onNotificationGCM"}]
09-30 15:50:36.160: V/PushPlugin(982): execute: jo={"senderID":"85546438302","ecb":"onNotificationGCM"}
09-30 15:50:36.160: V/PushPlugin(982): execute: ECB=onNotificationGCM senderID=85546438302
09-30 15:50:36.192: D/GCMRegistrar(982): resetting backoff for com.push
09-30 15:50:36.300: V/GCMRegistrar(982): Registering app com.push of senders 85546438302
09-30 15:50:37.339: D/DroidGap(982): onMessage(spinner,stop)

Thx for help.

PushPlugin on iOs not using PhoneGap Build with Phonegap 3.0

Hello People,

I can´t get the plugin working.

  • placed the .h and .m files in the Plugins folder
  • .js in the www folder and a reference in index.html
  • plugin reference in config.xml outside the www folder

feature name="PushPlugin" <- not sure if this is correct
param name="ios-package" value="PushPlugin"
feature

I'm missing 1 thing, inside my www folder I have another plugin folder. The facebook connect plugin had a folder to add, named "org.apache.cordova.core.facebook.Connect". Should there be a folder named "org.apache.cordova.PushPlugin"?

In my onDeviceReady I placed the code
var pushNotification;
pushNotification = window.plugins.pushNotification;
pushNotification.register(tokenHandler, errorHandler {"badge":"true","sound":"true","alert":"true","ecb":"onNotificationAPN"});

After this the application just shows white screen with no errors.

I hope anyone can help me out.
Thanks in advance.

Trigger a js function when a GenericPush notification is send

Hi,

I'm using push notifications with Phonegap Build for iOS.

I can receive notifications: it's showing an alert and adds an entry to the notification center. Nice ;-)

But once I click that notification, I want to do something with it in the app.
How can this be done? Now the app just launches, but I can't find a way to catch it there (e.g. to show it in tha app and store it locally)

I have the "ecb" callback function triggered when the app is already open when the notification is send, but this function is not triggered when I launch the app by clicking a notification.

Any options for this?

On Android, all works fine.

tnx!

Eclips compiler error after copy plugin/gcm folder

I have a working Eclipse project, where I'd like to build in push notificatoins.
After I copy the folders from src/android/com/ to my src/com/, Eclipse is giving me the next error:

[2013-07-24 07:51:28 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
[2013-07-24 07:51:28 - MyApp] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

Is this a known error, and even better, does anyone know how to solve this?

PushPlugin in iOs 7

Hi,

I'm using phonegap 2.9 and xCode 5.

After I updated xCode 5 and build my app on iOs7 iPhone 5 there was a build error:
8:31: Property 'uniqueIdentifier' not found on object of type 'UIDevice *'

at line: [results setValue:dev.uniqueIdentifier forKey:@"deviceUuid"];

I already tried to replace uniqueIdentifier with identifierForVendor and uniqueAppInstanceIdentifier, but no succes.

Can anyone help me with this?
Thanks in advance!

isEnabled

You have the code to check if push notifications are disabled on the ios device but give no way to access this information.

iOS Notifications not shown in lock screen

Environment: iOS 6 using phoengap build with hydration turned on.

In app and closed app notifications are working fine but if the app goes into the background (by locking the phone) no notifications are shown.

Is there a way I can capture the background notifications and bubble them up to the user?

Not getting notifications in device

Hello

I have successfully done things. in my app i m getting the token as well.
When i m running php script with same token number and ck.pem with it i m getting connected to APNS Message successfully delivered . But no notification in the app even after copying four files in plugins folder and implementing code for notification as onNotificationAPN function. I have included js file in index.html and updated config.xml as well.Please help.

Thanx in advance.

Build Error after adding this plugin

When I try to build the app, I get the below error and build fails.

I am using cordova 2.9

[javac] /Volumes/space/HCM/Sencha/Project/HCMDoctor/src/com/plugin/gcm/GCMIntentService.java:20: error: package android.support.v4.app does not exist
[javac] import android.support.v4.app.NotificationCompat;
[javac] ^
[javac] /Volumes/space/HCM/Sencha/Project/HCMDoctor/src/com/plugin/gcm/GCMIntentService.java:94: error: package NotificationCompat does not exist
[javac] NotificationCompat.Builder mBuilder =
[javac] ^
[javac] /Volumes/space/HCM/Sencha/Project/HCMDoctor/src/com/plugin/gcm/GCMIntentService.java:95: error: package NotificationCompat does not exist
[javac] new NotificationCompat.Builder(context)
[javac] ^
[javac] 3 errors

How can i use this great plugin with PHP?

Hello i install this plugin on an iPod device i prove, a static push notification and it works! reading tutorial, i saw a oration like "Those values will typically get posted to your intermediary push server so it knows who it can send notifications to." this refers that i need a server? if this the case... how can i put the url ro my server from the aplication plugin? is there any fix for this? my problem is, i want to send notification when my client up a new slider from his page... something easy... but how i send a push notifiction when this action started? obviusly i need to write my server url like "www.mysite.com/apnservice.php?method=requestpush" or something like that with javascript, can anybody helpme?? thanks!

iOS ecb callback not firing with PushNotification plugin

I've done a full write up of the problem on the PG Build forum, as I assumed to begin with that this was an issue with Build.

They have directed me to post an issue here, though, so here you go :)

http://community.phonegap.com/nitobi/topics/ios_ecb_callback_not_firing_with_pushnotification_plugin

The summary of the post is:
Using more or less the boilerplate example, everything works as expected on Android. iOS calls the token handler, but does not call the ecb callback. If the app is in the background the notice is displayed in the notification area or the lock screen on iOS, but activating the app still doesn't cause the ecb handler to run.

Define APNS data in cold-start functionality?

Where do I have to define the APNS data in cold-start functionality?

The register function can't be executed because I'm probably missing some settings:

$("#app-status-ul").append('

  • registering iOS
  • ');
    pushNotification.register(tokenHandler, errorHandler, {"badge":"true","sound":"true","alert":"true","ecb":"onNotificationAPN"});

    Where do I need to define the APNS settings? config.xml?

    Thanks in advance

    "no valid 'aps-environment' entitlement string found for application" on iOS with Phonegap Build

    I've use Phonegap build with PushPlugin to do Push notification for Android and iOS

    In Android version everything work perfectly ,but in iOS version i've got error

    "no valid 'aps-environment' entitlement string found for application"

    I do some research for this error , they said I MUST use DISTRIBUTED provisioning profile , and I'm sure I do everything correctly in signing process.

    Please let me know how to fix this problem or some link that make sure I can solve problem, I have no progress for 2 days .

    Sorry for my bad English and thank in advance .

    Domiiez

    unregister and the docs

    The docs say "You will typically call this when your app is exiting, to cleanup any used resources" and "...its recommended that, in a production environment, that you have a matching unregister() call, for every call to register(), and that your server updates the devices' records each time."

    However iOS says "You should call this method in rare circumstances only, such as when a new version of the application drops support for remote notifications." This seems contradictory to the PushPlugin docs.

    Also, if you do invalidate the token on app exit, how would you send a notification to the device when the app was not running?

    Why calling unregister() on application exit

    Hi,

    As far as I can understand from the description of the unregister() function, you recommend that we call it on application exit. Or as you say, we should have a matching unregister() call for each register().

    This does not make much sense to me. When I call register(), it is to obtain a push token, send it to my web service and then use it to push notifications to the device. This is the common pattern with push notifications, valid for all providers - APN, GCM, MPNS.

    If I call unregister() when the user exists the app, the push token gets invalidated, meaning no notifications unless the app is running. Am I missing something here? Can you please explain this?

    Thanks.

    Dismiss iOS Notification When Tapped

    At least as of version 1.2.2, tapping a notification on iOS opens the app correctly, but the notification is not dismissed. It's not easy for me to test higher versions of the PushPlugin because I use Icenium (which is still working on custom plugins), but I don't see any changes in the code related to this issue. Has this been fixed, or is this possible to be corrected? Thanks.

    No event after coldstart on android

    I cannot achieve to read the message data when launching the app after a coldstart.

    Has somewhen went to perform this?
    Is there something to avoid at the start of the app?

    Testing my jquery mobile app on Android with Phonegap Build:

    App ID
    182602

    Version
    2.0.0

    PhoneGap
    2.9.0

    successHandler does not fire when calling register on Android

    I'm more or less using the boilerplate example code, which includes this line for registering a device on Android:

    pushNotification.register(successHandler, errorHandler, {"senderID":"[my sdk id]","ecb":"onNotificationGCM"}); 
    

    However, when launching this app, the successHandler callback function is never fired. On iOS, the equivalent function, tokenHandler does fire.

    We also receive a registration notification back from the server, which fires in this:

          case 'registered':
            if (e.regid.length > 0) {
              window.alert('<li>REGISTERED -> REGID:' + e.regid + "</li>");
              // Your GCM push server needs to know the regID before it can push to this device
              // here is where you might want to send it the regID for later use.
              console.log('regID = ' + e.regID);
            }
            break;
    

    We can work around this since the notification is coming back, but something seems to be wrong with the register callback on Android.

    some problem in xCode 4.6.3

    in PushPlugin.m:

    - (void)dealloc
    {
    //    [notificationMessage release];
        self.notificationCallbackId = nil;
        self.callback = nil;
    
    //    [super dealloc];
    }
    

    in AppDelegate+notification.m:

    - (void)dealloc
    {
        self.launchNotification = nil; // clear the association and release the object
    //    [super dealloc];
    }
    

    how can i fix this without this 3 comments?

    Urban Airship Copyright Notice

    Hi,

    I am using this plugin and noticed that the copyright notice in the PushPlugin.h and PushPlugin.m files contain a copyright notice from Urban Airship with the following stipulation:

     2. Redistributions in binaryform must reproduce the above copyright notice,
     this list of conditions and the following disclaimer in the documentation
     and/or other materials provided withthe distribution.
    

    Are these terms that I need to include within the copyright notice of my application? I did not see any mentions of it in the documentation.

    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.