Parse Push notification not sent from Android to channel

I am using Parse. When I send a push notification from a website to my phone (specific channel), it works fine. But when I try to send a notification from my phone to the same channel (or all), it does not send.

I submit it with the onClick button.

(The code is very long, so I cut out the corresponding fragments)

(This is an oncreate btw post)

Parse.initialize(this, "CODE", "CODE"); ParseInstallation.getCurrentInstallation().saveInBackground(); ParsePush.subscribeInBackground("Channel1"); //PushService.startServiceIfRequired(this); 

-

 case R.id.sendButton: ParsePush push = new ParsePush(); String message = "Test" ; //push.setChannel("Channel1"); push.setMessage(message); push.sendInBackground(); break; 

(Yes, the button works)

Can anybody help me? What am I doing wrong?

Can provide additional information if desired!

Yes, I read the Parse documentation. I just can't understand what I'm doing wrong here. I am also trying ParsePush.send () ;, ignoring threads. Does not work.

+5
source share
1 answer

(The question was answered in the editing question. Converted to the community wiki to fit the Q & A StackOverflow format. )

OP wrote (a):

Ok, so after some research, I found this:

enter image description here

in the push settings on the website. This basically allows you to send from clients (devices) to other people.

And also, a dumb mistake, forgetting to put .setOnClickListener on my button.

0
source

Source: https://habr.com/ru/post/1204630/


All Articles