java.lang.Object | ||||||
↳ | android.content.Context | |||||
↳ | android.content.ContextWrapper | |||||
↳ | android.app.Service | |||||
↳ | android.app.IntentService | |||||
↳ | com.google.android.gcm.GCMBaseIntentService | |||||
↳ | com.kinvey.android.push.KinveyGCMService |
IntentService responsible for handling GCM messages.
Upon successful registration/unregistration with GCM, this class will perform the appropriate action with Kinvey as well.
To use GCM for push notifications, extend this class and implement the provided abstract methods. When GCM related events occur, they relevant method will be called by the library.Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | MESSAGE_FROM_GCM |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
KinveyGCMService()
Public Constructor used by operating system.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | gcmEnabled() | ||||||||||
String | getAppKey() | ||||||||||
String | getAppSecret() | ||||||||||
String | getBaseURL() | ||||||||||
String | getSenderIDs() | ||||||||||
boolean | inProduction() | ||||||||||
abstract void |
onDelete(int deleteCount)
This method is called when GCM messages are deleted.
| ||||||||||
void | onDestroy() | ||||||||||
void | onError(Context context, String errorId) | ||||||||||
abstract void |
onError(String error)
This method is called when an error occurs with GCM.
| ||||||||||
abstract void |
onMessage(String message)
This method is called when a message is received through GCM via Kinvey.
| ||||||||||
abstract void |
onRegistered(String gcmID)
This method is called after successful registration.
| ||||||||||
abstract void |
onUnregistered(String oldID)
This method is called after successful unregistration.
| ||||||||||
void | registerWithKinvey(Client client, String gcmRegID, boolean register) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Public Constructor used by operating system.
This method is called when GCM messages are deleted.
deleteCount | the number of deleted messages |
---|
This method is called when an error occurs with GCM.
error | the text of the error message |
---|
This method is called when a message is received through GCM via Kinvey.
message | the text of the message |
---|
This method is called after successful registration. This includes both registering with GCM as well as Kinvey.
gcmID | the new user's unique GCM registration ID |
---|
This method is called after successful unregistration. This includes removing push from both GCM as well as Kinvey.
oldID | the old GCM registration ID of the now unregistered user. |
---|