wordpress-clients / hybrid

[I don't have time to work on this anymore. Use at your own risk] Build WordPress based PWA, iOS, Android & Windows phones apps in minutes!
MIT License
1.02k stars 348 forks source link

push Notifications register failed #385

Closed SBrendan closed 7 years ago

SBrendan commented 7 years ago

Hi,

I have a problem with the push notification for Android version. On the debug mode i have this error =>[pushNotifications] register failed!

config.cson

"pushNotifications": "enabled": true "baseUrl": "http://stadion-actu.fr/pnfw" "android": "senderID": "8154410254"

I have add my server key to the plugin in wordpress, but it's do not work. I have get my Sender id and from Firebase => project => gear => project settings => cloud messaging tab => sender id and server key and I'm add the google-service.json to my project and the plugins in build.graddle

Sorry for my bad english.

shprink commented 7 years ago

Can you share the request response please?

SBrendan commented 7 years ago

Thx for your response. I took a screenshot of the console

http://hpics.li/d545c5f

shprink commented 7 years ago

You have a 401 response. The answer is here: https://github.com/wordpress-clients/hybrid/blob/develop/PUSHNOTIFICATIONS.md#parameter-oauth_consumer_key-is-missing

SBrendan commented 7 years ago

Thank you for your response, but the solution is buy the libraries for android ?

shprink commented 7 years ago

not at all.

Hello, first of all try to disabile OAuth under Push Notifications > OAuth to ease the configuration of Push Notifications for WordPress (Lite).

SBrendan commented 7 years ago

Thank you, I have resolved my problem, it's on my config file i'm enter http and my website is https.