Sending Client Push Notification Via Button click in android
24 views
Skip to first unread message
Raul Morales Jr
unread,
Sep 2, 2016, 2:04:53 PM9/2/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to back{4}app
Hey guys, I'm having issues trying to set this up. I'm a noob and still confused on how to implement this code. So far i am able to successfully send push notifications to devices via Back4app web push with no issues. Now i would like to set up a client push through button click for my chat app to notify users that a new message was sent in the app. So far from what i understand i have to upload the main.js to back4app cloudcode section seen in the attachment of this post. Now i have no idea on how to call this in the app under the button click. So far i have this inside the button click. any help would greatly be appreciated. thanks in advance.
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("Message", message.getBody()); ParseCloud.callFunctionInBackground("push", params, new FunctionCallback<Float>() { public void done(Float ratings, ParseException e) { if (e == null) {