Skip to content
This repository has been archived by the owner on Feb 25, 2018. It is now read-only.

subscription always shows as 0 when send notification to android using reset api #154

Open
senthilcse opened this issue Jun 9, 2014 · 0 comments

Comments

@senthilcse
Copy link

Hi,
We are new to Parse. We are try to send push notification from REST API but we get subscription always shows as 0 when send notification to android using reset api. But when we try from parse.com it will reached to mobile. Where we are make a mistake. Kindly help us to resolve the issue.

Here with am mentioned the code:

$data = array(
'channel' => '',
'type' => 'android',
'installationId'=>$d_device_token,
'data' => $pushmessage,
'action'=>'FA'
);
$_data = json_encode($data);

                        $headers = array(
                            'X-Parse-Application-Id: ' . $APPLICATION_ID,
                            'X-Parse-REST-API-Key: ' . $REST_API_KEY,
                            'Content-Type: application/json',
                            'Content-Length: ' . strlen($_data),
                        );

                        $curl = curl_init($url);
                        curl_setopt($curl,CURLOPT_RETURNTRANSFER, true);
                        curl_setopt($curl, CURLOPT_POST, 1);
                        curl_setopt($curl, CURLOPT_POSTFIELDS, $_data);
                        curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
                        $chk=curl_exec($curl);  
                        curl_close($curl);  

Notification does not send to android app. Kindly explain me what is going wrong?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant