Skip to content

Commit

Permalink
Add senderID from installation as Android default.
Browse files Browse the repository at this point in the history
- Prefer explicitly defined SENDER_ID from the plugin's JS.
- I believe this resolves phonegap#689 without breaking existing compatibility.
  • Loading branch information
Christopher Prescott committed Mar 16, 2016
1 parent b1b5e9d commit fb62e1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/android/com/adobe/phonegap/push/PushPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public void run() {

Log.v(LOG_TAG, "execute: jo=" + jo.toString());

senderID = jo.getString(SENDER_ID);
// Prefer explicitly defined SENDER_ID from the plugin's JS. Default to installation information.
senderID = !jo.isNull(SENDER_ID) ? jo.getString(SENDER_ID) : getSenderIdFromApplicationManifest();

Log.v(LOG_TAG, "execute: senderID=" + senderID);

Expand Down

0 comments on commit fb62e1c

Please sign in to comment.