Push notifications android 1st, then iOS

Completed Posted 5 years ago Paid on delivery
Completed Paid on delivery

i need help.

i have the server side PHP sample code, just need to get things right to get it to work. currently i am getting this error from the server sending the msg, Error 401: Invalid (legacy) Server-key delivered or Sender is not authorized to perform request.

can add you to firebase to see the information

can give you my token to test.

PHP sample code:

$notification = array

(

'title' => $receiverName. ': A new message for you',

'body' => $message,

'sound' => 'default'

);

$data = array

(

'message' => $message,

'click_action' => "PUSH_INTENT"

);

$fields = array

(

'registration_ids' => $registrationIds,

'notification' => $notification,

'data' => $data,

'priority' => 'normal'

);

$headers = array

(

'Authorization: key='.API_ACCESS_KEY,

'Content-Type: application/json'

);

$ch = curl_init();

curl_setopt( $ch,CURLOPT_URL, '[login to view URL]' );

curl_setopt( $ch,CURLOPT_POST, true );

curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );

curl_setopt( $ch,CURLOPT_RETURNTRANSFER, false); //true orig ); returns err info if false

curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, false );

curl_setopt( $ch,CURLOPT_POSTFIELDS, json_encode( $fields ) );

$result = curl_exec($ch );

curl_close( $ch );

Android Mobile App Development MySQL PHP Software Architecture

Project ID: #17893158

About the project

4 proposals Remote project Active 5 years ago

Awarded to:

deming723

Hello, I can definitely build your app and have done a lot of functional work in this area. I have more than 8 years experience building iOS and Android apps. I’d like to learn more about your project details so I c More

$25 USD in 1 day
(44 Reviews)
7.0

4 freelancers are bidding on average $81 for this job

WhollySoftware

Hello, Greetings from Wholly Software! I have company that’s name Wholly Software. We are Working Website Designing, Custom Software Development , Backend development(Core PHP, Laravel, Codeingnator, Node.js), Mobile More

$25 USD in 1 day
(14 Reviews)
5.1
Apatelanalyst

Can solve this and get it to you within 5 hours guaranteed. Also, I am USA based so easy to get ahold of

$25 USD in 1 day
(0 Reviews)
0.0