Hello,
I tried to set up push notification using Firebase Cloud Messaging for my app and I was succesfull ..... to some degree. The problem is that notifications appear for AppGameKit Player and not my app as you can see in the pictures:

This is the code I use in my app to setup notifications:
SetPushNotificationKeys( "SenderID","id from firebase project settings, cloud messaging under SenderID")
result = PushNotificationSetup()
if ( result = 1 )
token$ = GetPushNotificationToken()
// and code that writes notification token into database
and code i use on server to send notification:
function SendPushNotificationAndroid( $deviceToken, $message, $title )
{
// Replace with real SERVER API key from Google APIs
$apiKey = "server key from firebase settings .....i also tried legacy key with the same results";
// Set POST variables
$url = 'https://fcm.googleapis.com/fcm/send';
$fields = array(
'to' => $deviceToken,
'notification' => array( "title" => $title, "body" => $message ),
'priority' => "high",
);
$headers = array(
'Authorization: key=' . $apiKey,
'Content-Type: application/json'
);
// Open connection
$ch = curl_init();
// Set the url, number of POST vars, POST data
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_POSTFIELDS, json_encode( $fields ) );
// Execute post
echo "Sending\n";
$result = curl_exec($ch);
// Close connection
curl_close($ch);
echo "Result: " . $result ."\n";
}
Anyone has any idea why this doesnt work as it should ? Any help would be appreciated.
Also if you have other ideas on how to get the notifications working I am all ears.
[edit]: problem with pictures