Skip to content

Commit bfd9651

Browse files
committed
Add more log for push
1 parent a7f3f9b commit bfd9651

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Parse/src/main/java/com/parse/GcmRegistrar.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ public Task<Void> handleRegistrationIntentAsync(Intent intent) {
182182
String registrationId = intent.getStringExtra(REGISTRATION_ID_EXTRA);
183183

184184
if (registrationId != null && registrationId.length() > 0) {
185+
PLog.v(TAG, "Get deviceToken " + registrationId + " from GCM.");
186+
185187
ParseInstallation installation = ParseInstallation.getCurrentInstallation();
186188
// Compare the new deviceToken with the old deviceToken, we only update the
187189
// deviceToken if the new one is different from the old one. This does not follow google

Parse/src/main/java/com/parse/ParsePushBroadcastReceiver.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ public void onReceive(Context context, Intent intent) {
138138
protected void onPushReceive(Context context, Intent intent) {
139139
JSONObject pushData = null;
140140
try {
141-
pushData = new JSONObject(intent.getStringExtra(KEY_PUSH_DATA));
141+
String pushDataStr = intent.getStringExtra(KEY_PUSH_DATA);
142+
PLog.v(TAG, pushDataStr);
143+
pushData = new JSONObject(pushDataStr);
142144
} catch (JSONException e) {
143145
PLog.e(TAG, "Unexpected JSONException when receiving push data: ", e);
144146
}

0 commit comments

Comments
 (0)