Skip to content
This repository was archived by the owner on Feb 25, 2018. It is now read-only.
This repository was 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

@senthilcse

Description

@senthilcse

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions