How to send a high-priority GCM?
https://developers.google.com/cloud-messaging/concept-options?hl=en#setting-the-priority-of-a-message
In fact, it's related with Google Play Services version not Android version. Use "high" for priority.
Just add this into your File (.php, .jsf, etc):
$fields = array(
'registration_ids' => $android,
**'priority' => 'high',**
'data' => array( 'message' => $message,
'title' => $title,
'created_at' => $created_at,
'is_background' => $is_background,
'pantallaMostrarPushAndroid' => "pushNotificationNormal")
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
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));
// Execute post
$resultAndroid = curl_exec($ch);
Setting priority to 10 is the correct thing to do, but it does not work with the version of Android M released at I/O. It has been fixed, and priority 10 messages will work as expected with the public release.