GCM

1. Requirements

  1. Google console :: Project Id.
  1. Enable API :: Get API key.
  1. Client.
  1. Server.

2. Sequence

  1. Client sends Project Id to Google server.
  1. Client get a GCM key.
  1. Client relays this to server.
  1. Client registers it GCM intent listener.

5. Server sends following request to the GCM server

1. Header

1. Target

  1. Https://android.googleapis.com/gcm/send.

2. Header

1. Authentication

1. key=

  1. API-key.

2. content-type

  1. Application/json.

3. Content

1. registration_ids

  1. (array) [].

2. data

1. (aso. array) {
  1. Message.
  1. ….
  1. Client’s app’s listener receives the notification.

3. Sound

  1. Notification.sound = Uri.parse("android.resource://" + getPackageName() + "/" +R.raw.pop);.
  1. Notification.defaults |= Notification.DEFAULT_VIBRATE;.
Updated: 2026 Aug 19