android.app
Class Service
java.lang.Object
android.content.Context
android.content.ContextWrapper
android.app.Service
- All Implemented Interfaces:
- ComponentCallbacks, ComponentCallbacks2
- Direct Known Subclasses:
- AbstractInputMethodService, AccessibilityService, IntentService, RecognitionService, RemoteViewsService, SpellCheckerService, TextToSpeechService, VpnService, WallpaperService
public abstract class Service
- extends ContextWrapper
- implements ComponentCallbacks2
Fields inherited from class android.content.Context |
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MODE_APPEND, MODE_MULTI_PROCESS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NFC_SERVICE, NOTIFICATION_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELEPHONY_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, UI_MODE_SERVICE, USB_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE |
Methods inherited from class android.content.ContextWrapper |
attachBaseContext, bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getFileStreamPath, getMainLooper, getObbDir, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getSystemService, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setTheme, setWallpaper, setWallpaper, startActivities, startActivity, startInstrumentation, startIntentSender, startService, stopService, unbindService, unregisterReceiver |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
START_CONTINUATION_MASK
public static final int START_CONTINUATION_MASK
- See Also:
- Constant Field Values
START_STICKY_COMPATIBILITY
public static final int START_STICKY_COMPATIBILITY
- See Also:
- Constant Field Values
START_STICKY
public static final int START_STICKY
- See Also:
- Constant Field Values
START_NOT_STICKY
public static final int START_NOT_STICKY
- See Also:
- Constant Field Values
START_REDELIVER_INTENT
public static final int START_REDELIVER_INTENT
- See Also:
- Constant Field Values
START_FLAG_REDELIVERY
public static final int START_FLAG_REDELIVERY
- See Also:
- Constant Field Values
START_FLAG_RETRY
public static final int START_FLAG_RETRY
- See Also:
- Constant Field Values
Service
public Service()
getApplication
public final Application getApplication()
onCreate
public void onCreate()
onStart
public void onStart(Intent intent,
int startId)
onStartCommand
public int onStartCommand(Intent intent,
int flags,
int startId)
onDestroy
public void onDestroy()
onConfigurationChanged
public void onConfigurationChanged(Configuration newConfig)
- Specified by:
onConfigurationChanged
in interface ComponentCallbacks
onLowMemory
public void onLowMemory()
- Specified by:
onLowMemory
in interface ComponentCallbacks
onTrimMemory
public void onTrimMemory(int level)
- Specified by:
onTrimMemory
in interface ComponentCallbacks2
onBind
public abstract IBinder onBind(Intent intent)
onUnbind
public boolean onUnbind(Intent intent)
onRebind
public void onRebind(Intent intent)
onTaskRemoved
public void onTaskRemoved(Intent rootIntent)
stopSelf
public final void stopSelf()
stopSelf
public final void stopSelf(int startId)
stopSelfResult
public final boolean stopSelfResult(int startId)
startForeground
public final void startForeground(int id,
Notification notification)
stopForeground
public final void stopForeground(boolean removeNotification)
dump
protected void dump(FileDescriptor fd,
PrintWriter writer,
String[] args)
Copyright © 2008-2012. All Rights Reserved.