Skip to content

Instantly share code, notes, and snippets.

@vivex
Created August 18, 2015 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vivex/3f4271b177180d76c17c to your computer and use it in GitHub Desktop.
Save vivex/3f4271b177180d76c17c to your computer and use it in GitHub Desktop.
try {
Result result = sender.send(msg2, account.getGcmRegId(), retries);
if (StringUtils.isEmpty(result.getErrorCodeName())) {
System.out.println(msg2.toString() + "GCM Notification is sent successfully" + result.toString());
return true;
}
System.out.println("Error occurred while sending push notification :" + result.getErrorCodeName());
} catch (InvalidRequestException e) {
System.out.println("Invalid Request");
} catch (IOException e) {
System.out.println("IO Exception");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment