Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
Issue #1002: FYI: Resumed iOS 10 Notifications results in an error
Browse files Browse the repository at this point in the history
  • Loading branch information
macdonst committed Jun 24, 2016
1 parent 17de54c commit 7a21dff
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void onReceive(Context context, Intent intent) {

originalExtras.putBoolean(FOREGROUND, false);
originalExtras.putBoolean(COLDSTART, false);
originalExtras.putString(CALLBACK, extras.getString("callback"));
originalExtras.putString(ACTION_CALLBACK, extras.getString(CALLBACK));
PushPlugin.sendExtras(originalExtras);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/android/com/adobe/phonegap/push/PushConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public interface PushConstants {
public static final String VIBRATE = "vibrate";
public static final String ACTIONS = "actions";
public static final String CALLBACK = "callback";
public static final String ACTION_CALLBACK = "actionCallback";
public static final String DRAWABLE = "drawable";
public static final String MSGCNT = "msgcnt";
public static final String VIBRATION_PATTERN = "vibrationPattern";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private void processPushBundle(boolean isPushPluginActive) {

originalExtras.putBoolean(FOREGROUND, false);
originalExtras.putBoolean(COLDSTART, !isPushPluginActive);
originalExtras.putString(CALLBACK, extras.getString("callback"));
originalExtras.putString(ACTION_CALLBACK, extras.getString(CALLBACK));

PushPlugin.sendExtras(originalExtras);
}
Expand Down
4 changes: 2 additions & 2 deletions www/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var PushNotification = function(options) {
var success = function(result) {
if (result && typeof result.registrationId !== 'undefined') {
that.emit('registration', result);
} else if (result && result.additionalData && typeof result.additionalData.callback !== 'undefined') {
} else if (result && result.additionalData && typeof result.additionalData.actionCallback !== 'undefined') {
var executeFunctionByName = function(functionName, context /*, args */) {
var args = Array.prototype.slice.call(arguments, 2);
var namespaces = functionName.split('.');
Expand All @@ -45,7 +45,7 @@ var PushNotification = function(options) {
return context[func].apply(context, args);
};

executeFunctionByName(result.additionalData.callback, window, result);
executeFunctionByName(result.additionalData.actionCallback, window, result);
} else if (result) {
that.emit('notification', result);
}
Expand Down

0 comments on commit 7a21dff

Please sign in to comment.