-
-
Notifications
You must be signed in to change notification settings - Fork 734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more log for push #249
Conversation
wangmengyan95
commented
Nov 13, 2015
- Add log when we recive deviceToken from GCM.
- Add log when developers try to use PPNS but miss something.
- Add log to recommend developers to use GCM
@hallucinogen it would be great if you can also tay a look. |
By analyzing the blame information on this pull request, we identified @grantland and @wangmengyan95 to be potential reviewers. |
@@ -260,6 +261,40 @@ public static PushType getPushType() { | |||
PLog.e(TAG, "Cannot use GCM for push because the app manifest is missing some " + | |||
"required declarations. Please " + getGcmManifestMessage()); | |||
} | |||
} else if (hasAnyPPNSSpecificDeclaration) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we clean this up on purpose. We used to have this flag. @grantland
5feac86
to
bfd9651
Compare
@wangmengyan95 updated the pull request. |
@@ -138,7 +138,9 @@ public void onReceive(Context context, Intent intent) { | |||
protected void onPushReceive(Context context, Intent intent) { | |||
JSONObject pushData = null; | |||
try { | |||
pushData = new JSONObject(intent.getStringExtra(KEY_PUSH_DATA)); | |||
String pushDataStr = intent.getStringExtra(KEY_PUSH_DATA); | |||
PLog.v(TAG, pushDataStr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether this introduces too much overhead for production, but for debugging purpose, I think this is necessary since there is no reliable way for us to tell whether a device has received a push notification or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fine. We also did something similar on .NET.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Received push data: " + pushDataStr
yay! |
bfd9651
to
e8fc559
Compare
@wangmengyan95 updated the pull request. |
LGTM |
…log_about_push Add more log for push
@wangmengyan95 updated the pull request. |