Skip to content
johanneswuerbach edited this page Nov 15, 2012 · 12 revisions

General

Create a device identifier

Please follow the instructions you could find here:
http://android-developers.blogspot.de/2011/03/identifying-app-installations.html

Notifications

Register a device

To register a device send an HTTP-Post request to
http://mobile-notifications.softgames.de/devices/app.name

Name Value
device[registration_id] User’s google cloud message identifier
device[device_id] Device identifier
**Example** > POST devices/de.softgames.tester > device[registration_id] =APA91bH3pBYeP8A3AyzTPB2b9I6JvGcQR_CR2aEF9N3pDx9zBBLc7Fj4VbekIAJ9DTGIzEGMQZn0DXULl-uI5PU9UYSSHYCjsW9P8mVhAJ0qLRmECceDcvJUVChTcZjLqraJdIXa5J4f6aHKbIHR1pAQaU8Fr1531Q &device[device_id]=c896b2b4-ee28-41ed-8b0c-a5b49a9fa483

Unregister a device

To unregister a device send an HTTP-Delete request to
http://mobile-notifications.softgames.de/devices/app.name/device_id Example

DELETE devices/de.softgames.tester/c896b2b4-ee28-41ed-8b0c-a5b49a9fa483

Display a notification

Notification you will receive from the Google Cloud Messaging service will contain the following data.

Name Value
title The title of the notification
message The text of the notification
Checkout our example code for more information: https://github.com/softgames/android-tester/blob/master/src/de/softgames/tester/GCMIntentService.java