public class RegistrationIntentService
extends IntentService
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
TAG |
private static java.lang.String[] |
TOPICS |
Constructor and Description |
---|
RegistrationIntentService() |
Modifier and Type | Method and Description |
---|---|
protected void |
onHandleIntent(Intent intent) |
private void |
sendRegistrationToServer(java.lang.String token)
Persist registration to third-party servers.
|
private void |
subscribeTopics(java.lang.String token)
Subscribe to any GCM topics of interest, as defined by the TOPICS constant.
|
private static final java.lang.String TAG
private static final java.lang.String[] TOPICS
protected void onHandleIntent(Intent intent)
private void sendRegistrationToServer(java.lang.String token)
token
- The new token.private void subscribeTopics(java.lang.String token) throws java.io.IOException
token
- GCM tokenjava.io.IOException
- if unable to reach the GCM PubSub service