Android - high priority messages with google cloud messaging (using corona sdk)

Viewed 398

I'm trying to wake my phone or get the light blinking using GCM. I'm getting the messages just fine but theres no difference in setting a high priority or none at all. I'm using a razr maxx hd to test. is there anything I'm missing here?

<?php
// API access key from Google API's Console
define('API_ACCESS_KEY', 'blee');

// prep the bundle
$msg = array
(
    'body' => 'this is my nice body',
    'sound' => 'misc/androidnotification.mp3',

    'custom' => array(
        'route' => '/beee'
    )
);
$fields = array
(
    'collapse_key' => 'test',
    "time_to_live" => 0,
    'priority' => 'high',
    'to' => 'mykey',    
    'data'          => $msg,

);

$headers = array
(
    'Authorization: key=' . API_ACCESS_KEY,
    'Content-Type: application/json'
);

$ch = curl_init();
curl_setopt( $ch,CURLOPT_URL, 'https://android.googleapis.com/gcm/send' );
curl_setopt( $ch,CURLOPT_POST, true );
curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );
curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, false );
curl_setopt( $ch,CURLOPT_POSTFIELDS, json_encode( $fields ) );
$result = curl_exec($ch );
curl_close( $ch );
echo $result;
1 Answers
Related