android.app
Class Service

java.lang.Object
  extended by android.content.Context
      extended by android.content.ContextWrapper
          extended by android.app.Service
All Implemented Interfaces:
ComponentCallbacks
Direct Known Subclasses:
AbstractInputMethodService, AccessibilityService, IntentService, WallpaperService

public abstract class Service
extends ContextWrapper
implements ComponentCallbacks


Field Summary
static int START_CONTINUATION_MASK
           
static int START_FLAG_REDELIVERY
           
static int START_FLAG_RETRY
           
static int START_NOT_STICKY
           
static int START_REDELIVER_INTENT
           
static int START_STICKY
           
static int START_STICKY_COMPATIBILITY
           
 
Fields inherited from class android.content.Context
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, INPUT_METHOD_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MODE_APPEND, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NOTIFICATION_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, TELEPHONY_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
 
Constructor Summary
Service()
           
 
Method Summary
protected  void dump(java.io.FileDescriptor fd, java.io.PrintWriter writer, java.lang.String[] args)
           
protected  void finalize()
           
 Application getApplication()
           
abstract  IBinder onBind(Intent intent)
           
 void onConfigurationChanged(Configuration newConfig)
           
 void onCreate()
           
 void onDestroy()
           
 void onLowMemory()
           
 void onRebind(Intent intent)
           
 void onStart(Intent intent, int startId)
           
 int onStartCommand(Intent intent, int flags, int startId)
           
 boolean onUnbind(Intent intent)
           
 void setForeground(boolean isForeground)
           
 void startForeground(int id, Notification notification)
           
 void stopForeground(boolean removeNotification)
           
 void stopSelf()
           
 void stopSelf(int startId)
           
 boolean stopSelfResult(int startId)
           
 
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, getFilesDir, getFileStreamPath, getMainLooper, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getSystemService, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setTheme, setWallpaper, setWallpaper, startActivity, startInstrumentation, startIntentSender, startService, stopService, unbindService, unregisterReceiver
 
Methods inherited from class android.content.Context
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

Service

public Service()
Method Detail

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

onBind

public abstract IBinder onBind(Intent intent)

onUnbind

public boolean onUnbind(Intent intent)

onRebind

public void onRebind(Intent intent)

stopSelf

public final void stopSelf()

stopSelf

public final void stopSelf(int startId)

stopSelfResult

public final boolean stopSelfResult(int startId)

setForeground

public final void setForeground(boolean isForeground)

startForeground

public final void startForeground(int id,
                                  Notification notification)

stopForeground

public final void stopForeground(boolean removeNotification)

dump

protected void dump(java.io.FileDescriptor fd,
                    java.io.PrintWriter writer,
                    java.lang.String[] args)

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable


Copyright © 2008-2010. All Rights Reserved.