GCMBroadcastReceiver | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - Get Started
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
    - Get the SDK
  - Google Services
- - Google Play
  - Publishing
  - Promoting
  - App Quality
  - Spotlight
  - Open Distribution

## Results

Loading...
Summary: Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]
public class

# GCMBroadcastReceiver

extends BroadcastReceiver

java.lang.Object
↳ | android.content.BroadcastReceiver
| ↳ | com.google.android.gcm.GCMBroadcastReceiver

This class is deprecated.
Please use the `GoogleCloudMessaging` API instead.

## Class Overview

`BroadcastReceiver` that receives GCM messages and delivers them to an application-specific `GCMBaseIntentService` subclass.

By default, the `GCMBaseIntentService` class belongs to the application main package and is named `DEFAULT_INTENT_SERVICE_CLASS_NAME`. To use a new class, the `getGCMIntentServiceClassName(Context)` must be overridden.

## Summary

Public Constructors
| GCMBroadcastReceiver()

Public Methods
final void | onReceive(Context context, Intent intent)

Protected Methods
String | getGCMIntentServiceClassName(Context context) Gets the class name of the intent service that will handle GCM messages.

[Expand] Inherited Methods
From class android.content.BroadcastReceiver
final void | abortBroadcast()
final void | clearAbortBroadcast()
final boolean | getAbortBroadcast()
final boolean | getDebugUnregister()
final BroadcastReceiver.PendingResult | getPendingResult()
final int | getResultCode()
final String | getResultData()
final Bundle | getResultExtras(boolean arg0)
int | getSendingUserId()
final BroadcastReceiver.PendingResult | goAsync()
final boolean | isInitialStickyBroadcast()
final boolean | isOrderedBroadcast()
abstract void | onReceive(Context arg0, Intent arg1)
IBinder | peekService(Context arg0, Intent arg1)
final void | setDebugUnregister(boolean arg0)
final void | setOrderedHint(boolean arg0)
final void | setPendingResult(BroadcastReceiver.PendingResult arg0)
final void | setResult(int arg0, String arg1, Bundle arg2)
final void | setResultCode(int arg0)
final void | setResultData(String arg0)
final void | setResultExtras(Bundle arg0)
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Public Constructors

#### public GCMBroadcastReceiver ()

## Public Methods

#### public final void onReceive (Context context, Intent intent)

## Protected Methods

#### protected String getGCMIntentServiceClassName (Context context)

Gets the class name of the intent service that will handle GCM messages.