-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks,android.content.ComponentCallbacks2
public abstract class PushService extends Service
Service to receive UnifiedPush messages (new endpoints, unregistrations, push messages, errors) from the distributors
You need to declare a service that extend PushService. This service must not be exported and must handle the action
org.unifiedpush.android.connector.PUSH_EVENT:<service android:name=".PushServiceImpl" android:exported="false"> <intent-filter> <action android:name="org.unifiedpush.android.connector.PUSH_EVENT"/> </intent-filter> </service>You need to use UnifiedPush to register for push notifications.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classPushService.PushBinder
-
Constructor Summary
Constructors Constructor Description PushService()
-
Method Summary
Modifier and Type Method Description abstract UnitonNewEndpoint(PushEndpoint endpoint, String instance)A new endpoint is to be used for sending push messages. abstract UnitonMessage(PushMessage message, String instance)A new message is received. abstract UnitonRegistrationFailed(FailedReason reason, String instance)The registration is not possible, eg. abstract UnitonUnregistered(String instance)This application is unregistered by the distributor from receiving push messages IBinderonBind(Intent intent)-
Methods inherited from class android.app.Service
bindIsolatedService, bindService, bindService, bindService, bindService, bindServiceAsUser, bindServiceAsUser, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingOrSelfUriPermissions, checkCallingPermission, checkCallingUriPermission, checkCallingUriPermissions, checkContentUriPermissionFull, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, checkUriPermissions, clearWallpaper, createAttributionContext, createConfigurationContext, createContext, createContextForSplit, createDeviceContext, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, createWindowContext, createWindowContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getAttributionSource, getAttributionTag, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDataDir, getDatabasePath, getDeviceId, getDir, getDisplay, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFileStreamPath, getFilesDir, getMainExecutor, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getOpPackageName, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getParams, getResources, getSharedPreferences, getSystemService, getSystemServiceName, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, isUiContext, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerComponentCallbacks, registerDeviceIdChangeListener, registerReceiver, registerReceiver, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeSelfPermissionsOnKill, revokeUriPermission, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setTheme, setWallpaper, setWallpaper, startActivities, startActivities, startActivity, startActivity, startForegroundService, startInstrumentation, startIntentSender, startIntentSender, startService, stopService, unbindService, unregisterComponentCallbacks, unregisterDeviceIdChangeListener, unregisterReceiver, updateServiceGroup -
Methods inherited from class android.content.ContextWrapper
bindIsolatedService, getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, revokeSelfPermissionOnKill, sendBroadcastWithMultiplePermissions -
Methods inherited from class org.unifiedpush.android.connector.PushService
attachBaseContext, dump, getApplication, getForegroundServiceType, onConfigurationChanged, onCreate, onDestroy, onLowMemory, onRebind, onStart, onStartCommand, onTaskRemoved, onTimeout, onTimeout, onTrimMemory, onUnbind, startForeground, startForeground, stopForeground, stopForeground, stopSelf, stopSelf, stopSelfResult -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
onNewEndpoint
abstract Unit onNewEndpoint(PushEndpoint endpoint, String instance)
A new endpoint is to be used for sending push messages. The new endpoint should be send to the application server, and the app should sync for missing notifications.
-
onMessage
abstract Unit onMessage(PushMessage message, String instance)
A new message is received. The message contains the decrypted content of the push message for the instance
-
onRegistrationFailed
abstract Unit onRegistrationFailed(FailedReason reason, String instance)
The registration is not possible, eg. no network, depending on the reason, you can try to register again directly.
-
onUnregistered
abstract Unit onUnregistered(String instance)
This application is unregistered by the distributor from receiving push messages
-
-
-
-