Android Device is not receving notification when send data from PHP using REST api?
<blockquote>
  <p>i received GCM registration token for my device but when i am sending message using REST api from PHP, it shows Success but not receving message on device. php code </p>
</blockquote>

<pre><code>&lt;?php 
 $data = array( 'message' =&gt; 'Hello World! First Message from PHP' );
 $ids = 'device registration token';
 // Send a GCM push
 sendGoogleCloudMessage(  $data, $ids );

function sendGoogleCloudMessage( $data, $ids )
{
// Insert real GCM API key from Google APIs Console
// https://code.google.com/apis/console/        
$apiKey = 'API Key'; //(server API Key)
// Define URL to GCM endpoint
$url = 'https://gcm-http.googleapis.com/gcm/send';
// Set GCM post variables (device IDs and push payload)     
$post = array(
                'to'  =&gt; $ids,
                'data'              =&gt; $data,
                );

// Set CURL request headers (authentication and type)       
$headers = array( 
                    'Authorization: key=' . $apiKey,
                    'Content-Type: application/json'
                );

// Initialize curl handle       
$ch = curl_init();

// Set URL to GCM endpoint      
curl_setopt( $ch, CURLOPT_URL, $url );

// Set request method to POST       
curl_setopt( $ch, CURLOPT_POST, true );

// Set our custom headers       
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );

// Get the response back as string instead of printing it       
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );

// Set JSON post data
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $post ) );

// Actually send the push   
$result = curl_exec( $ch );

// Error handling
if ( curl_errno( $ch ) )
{
    echo 'GCM error: ' . curl_error( $ch );
}

// Close curl handle
curl_close( $ch );

// Debug GCM response       
echo $result;
print_r($result);
}
?&gt;
</code></pre>

<p>while submitting PHP file, it returns message as below, it seems message shows 'success' but no message received at device. can someone suggest if i need to take additional step or doing something wrong?</p>

<pre><code>{"multicast_id":8550022549195779350,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1459795352923689%21f96bfff9fd7ecd"}]}
</code></pre>