Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send notification to Android app from Java server using GCM?

Tags:

I have my simple Android application which uses REST web service. Now I want to sent notification from my REST web service to Android application using GCM.

How do this? Is there any simple tutorial for this requirement? I searched and found Google API, but I don't understand that.

like image 660
Bhushan Avatar asked Apr 02 '13 07:04

Bhushan


People also ask

How does GCM push notification work?

The first step in GCM is that a third-party server (such as an email server) sends a request to Google's GCM server. This server then sends the message to your device, through that open connection. The Android system looks at the message to determine which app it's for, and starts that app.

What is difference between GCM and FCM?

FCM is a cloud platform that provides messages and push notifications for operating systems- ios and Android, and websites as well. Google Cloud Messaging is a messaging service that enables the message transfer from server to clients apps.

What is GCM service on Android?

Google Cloud Messaging (GCM) is a service that allows you to send push notifications from your server to your users' Android devices, and also to receive messages from devices on the same connection.


1 Answers

I have created a Java-based test server, implemented as a maven plugin, for the GCMUtils project: https://code.google.com/p/gcmutils/wiki/MavenPlugin#Test_server

Here is the source code: https://github.com/jarlehansen/gcmutils/tree/master/gcm-test-server

Source for the maven plugin: https://github.com/jarlehansen/gcmutils/tree/master/gcmutils-maven-plugin

Maybe this can help you get started?

like image 65
Jarle Hansen Avatar answered Oct 05 '22 21:10

Jarle Hansen