Posts

Showing posts with the label Google Cloud Messaging

Can We Do Web Push Notifications In Chrome Without Using GCM/FCM?

Answer : No, it is not possible to use another push service. In Firefox, you can do it by modifying the dom.push.serverURL preference, but obviously you'd need privileged access to alter the value of the pref. There are third-party services that you can use to implement push notifications, but they will use the Web Push API under the hood (so Autopush on Firefox, GCM/FCM on Chrome). Yes. Using VAPID spec and service worker you can use web push notifications without FCM/GCM. For more information please look into below google docs. https://developers.google.com/web/fundamentals/engage-and-retain/push-notifications/how-push-works

Android: Test Push Notification Online (Google Cloud Messaging)

Answer : Found a very easy way to do this. Open http://phpfiddle.org/ Paste following php script in box. In php script set API_ACCESS_KEY, set device ids separated by coma. Press F9 or click Run. Have fun ;) <?php // API access key from Google API's Console define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); $registrationIds = array("YOUR DEVICE IDS WILL GO HERE" ); // prep the bundle $msg = array ( 'message' => 'here is a message. message', 'title' => 'This is a title. title', 'subtitle' => 'This is a subtitle. subtitle', 'tickerText' => 'Ticker text here...Ticker text here...Ticker text here', 'vibrate' => 1, 'sound' => 1 ); $fields = array ( 'registration_ids' => $registrationIds, 'data' => $msg ); $headers = array ( 'Autho...