java - Why does my ParsePush not sending from an Android client when attaching a URI? -
i have following notification code working:
private void sendnotification(parseuser user) { parsepush push = new parsepush(); parsequery<parseinstallation> query = parseinstallation.getquery(); query.whereequalto("user", user); push.setquery(query); push.setmessage("notification!"); push.sendinbackground(); }
however, when try attach uri notification, not send (the receiver not , there no entry in push console), no errors logged, or thrown when debug it.
private void sendnotification(parseuser user, string uri) { parsepush push = new parsepush(); parsequery<parseinstallation> query = parseinstallation.getquery(); query.whereequalto("user", user); push.setquery(query); jsonobject data = new jsonobject(); try { data.put("alert", "notification!"); data.put("uri", uri); } catch (jsonexception e) { log.w("sendnotification", "sendnotification failed"); e.printstacktrace(); } push.setdata(data); push.sendinbackground(); }
apparently according post, can't send notifications uri when using client push security precaution, understandable, nice if raised error let know.
Comments
Post a Comment