You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 6, 2021. It is now read-only.
hi,
first of all thanks for the bundle, performance with GCM is very good.
I've been trying to use 'AndroidMessage' and 'RMS\PushNotificationsBundle\Service\Notifications' class to notify IOS devices having the client application integrated with GCM but I do not get to see notifications in the app even though the method 'getResponses(Types::OS_ANDROID_GCM)' reports OK
however using this function i can see notifications in the app client:
sendGoogleCloudMessage($data, $ids) {
// Insert real GCM API key from Google APIs Console
// https://code.google.com/apis/console/
$apiKey = 'xxxxxxxxxxxxxxxxxxxxxxx';
// Define URL to GCM endpoint
$url = 'https://gcm-http.googleapis.com/gcm/send';
// Set GCM post variables (device IDs and push payload)
$post = array(
'registration_ids' => $ids,
'content_available' => true,
'priority' => 'high',
'data' => $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)) {
return 'GCM error: ' . curl_error($ch);
}
// Close curl handle
curl_close($ch);
// Debug GCM response
return $result;
}
somebody has tried or achieved send notifications to IOS devices via GCM using the bundle?
can someone guide me about it?
Beforehand thank you very much
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
hi,
first of all thanks for the bundle, performance with GCM is very good.
I've been trying to use 'AndroidMessage' and 'RMS\PushNotificationsBundle\Service\Notifications' class to notify IOS devices having the client application integrated with GCM but I do not get to see notifications in the app even though the method 'getResponses(Types::OS_ANDROID_GCM)' reports OK
however using this function i can see notifications in the app client:
somebody has tried or achieved send notifications to IOS devices via GCM using the bundle?
can someone guide me about it?
Beforehand thank you very much
The text was updated successfully, but these errors were encountered: