day04- Upper- android.content.Context

start time : 2016-1-21 21:24:06

well, it's looks I only have 36 minutes.  

public abstract class

Context

extends   Object
java.lang.Object
   ↳ android.content.Context
Known Direct Subclasses
ContextWrapper,   MockContext
Known Indirect Subclasses
AbstractInputMethodService,   AccessibilityService,   AccountAuthenticatorActivity,   ActionBarActivity,   Activity,   ActivityGroup,   AliasActivity, AppCompatActivity,   Application,   BackupAgent,   BackupAgentHelper,   CameraPrewarmService,   CarrierMessagingService, and   38 others.

Class Overview

Interface to global information about an application environment. This is an abstract class whose implementation is provided by the Android system. It allows access to application-specific resources and classes, as well as up-calls for application-level operations such as launching activities, broadcasting and receiving intents, etc.



another folder we know /android/content/  abstract class Context has many subclass. such as Activity, Service....  

global infomation about an application environment.
allow access to application-specific resources and classes
up-calls for application-level operations, such as launching activities, broadcasting and receiving intents

I found so many Manage can control device.

Summary

Constants
String ACCESSIBILITY_SERVICE Use with getSystemService(Class) to retrieve aAccessibilityManager for giving the user feedback for UI events through the registered event listeners.
String ACCOUNT_SERVICE Use with getSystemService(Class) to retrieve a AccountManager for receiving intents at a time of your choosing.
String ACTIVITY_SERVICE Use with getSystemService(Class) to retrieve a ActivityManager for interacting with the global system state.
String ALARM_SERVICE Use with getSystemService(Class) to retrieve a AlarmManager for receiving intents at a time of your choosing.
String APPWIDGET_SERVICE Use with getSystemService(Class) to retrieve a AppWidgetManager for accessing AppWidgets.
String APP_OPS_SERVICE Use with getSystemService(Class) to retrieve a AppOpsManager for tracking application operations on the device.
String AUDIO_SERVICE Use with getSystemService(Class) to retrieve a AudioManager for handling management of volume, ringer modes and audio routing.
String BATTERY_SERVICE Use with getSystemService(Class) to retrieve a BatteryManager for managing battery state.
int BIND_ABOVE_CLIENT Flag for bindService(Intent, ServiceConnection, int): indicates that the client application binding to this service considers the service to be more important than the app itself.
int BIND_ADJUST_WITH_ACTIVITY Flag for bindService(Intent, ServiceConnection, int): If binding from an activity, allow the target service's process importance to be raised based on whether the activity is visible to the user, regardless whether another flag is used to reduce the amount that the client process's overall importance is used to impact it.
int BIND_ALLOW_OOM_MANAGEMENT Flag for bindService(Intent, ServiceConnection, int): allow the process hosting the bound service to go through its normal memory management.
int BIND_AUTO_CREATE Flag for bindService(Intent, ServiceConnection, int): automatically create the service as long as the binding exists.
int BIND_DEBUG_UNBIND Flag for bindService(Intent, ServiceConnection, int): include debugging help for mismatched calls to unbind.
int BIND_IMPORTANT Flag for bindService(Intent, ServiceConnection, int): this service is very important to the client, so should be brought to the foreground process level when the client is.
int BIND_NOT_FOREGROUND Flag for bindService(Intent, ServiceConnection, int): don't allow this binding to raise the target service's process to the foreground scheduling priority.
int BIND_WAIVE_PRIORITY Flag for bindService(Intent, ServiceConnection, int): don't impact the scheduling or memory management priority of the target service's hosting process.
String BLUETOOTH_SERVICE Use with getSystemService(Class) to retrieve a BluetoothManager for using Bluetooth.
String CAMERA_SERVICE Use with getSystemService(Class) to retrieve a CameraManager for interacting with camera devices.
String CAPTIONING_SERVICE Use with getSystemService(Class) to retrieve a CaptioningManagerfor obtaining captioning properties and listening for changes in captioning preferences.
String CARRIER_CONFIG_SERVICE Use with getSystemService(Class) to retrieve aCarrierConfigManager for reading carrier configuration values.
String CLIPBOARD_SERVICE Use with getSystemService(Class) to retrieve a ClipboardManager for accessing and modifying ClipboardManager for accessing and modifying the contents of the global clipboard.
String CONNECTIVITY_SERVICE Use with getSystemService(Class) to retrieve a ConnectivityManagerfor handling management of network connections.
String CONSUMER_IR_SERVICE Use with getSystemService(Class) to retrieve a ConsumerIrManagerfor transmitting infrared signals from the device.
int CONTEXT_IGNORE_SECURITY Flag for use with createPackageContext(String, int): ignore any security restrictions on the Context being requested, allowing it to always be loaded.
int CONTEXT_INCLUDE_CODE Flag for use with createPackageContext(String, int): include the application code with the context.
int CONTEXT_RESTRICTED Flag for use with createPackageContext(String, int): a restricted context may disable specific features.
String DEVICE_POLICY_SERVICE Use with getSystemService(Class) to retrieve a DevicePolicyManagerfor working with global device policy management.
String DISPLAY_SERVICE Use with getSystemService(Class) to retrieve a DisplayManager for interacting with display devices.
String DOWNLOAD_SERVICE Use with getSystemService(Class) to retrieve a DownloadManager for requesting HTTP downloads.
String DROPBOX_SERVICE Use with getSystemService(Class) to retrieve a DropBoxManagerinstance for recording diagnostic logs.
String FINGERPRINT_SERVICE Use with getSystemService(Class) to retrieve a FingerprintManagerfor handling management of fingerprints.
String INPUT_METHOD_SERVICE Use with getSystemService(Class) to retrieve a InputMethodManagerfor accessing input methods.
String INPUT_SERVICE Use with getSystemService(Class) to retrieve a InputManager for interacting with input devices.
String JOB_SCHEDULER_SERVICE Use with getSystemService(Class) to retrieve a JobSchedulerinstance for managing occasional background tasks.
String KEYGUARD_SERVICE Use with getSystemService(Class) to retrieve a NotificationManagerfor controlling keyguard.
String LAUNCHER_APPS_SERVICE Use with getSystemService(Class) to retrieve a LauncherApps for querying and monitoring launchable apps across profiles of a user.
String LAYOUT_INFLATER_SERVICE Use with getSystemService(Class) to retrieve a LayoutInflater for inflating layout resources in this context.
String LOCATION_SERVICE Use with getSystemService(Class) to retrieve a LocationManager for controlling location updates.
String MEDIA_PROJECTION_SERVICE Use with getSystemService(Class) to retrieve aMediaProjectionManager instance for managing media projection sessions.
String MEDIA_ROUTER_SERVICE Use with getSystemService(Class) to retrieve a MediaRouter for controlling and managing routing of media.
String MEDIA_SESSION_SERVICE Use with getSystemService(Class) to retrieve a MediaSessionManagerfor managing media Sessions.
String MIDI_SERVICE Use with getSystemService(Class) to retrieve a MidiManager for accessing the MIDI service.
int MODE_APPEND File creation mode: for use with openFileOutput(String, int), if the file already exists then write data to the end of the existing file instead of erasing it.
int MODE_ENABLE_WRITE_AHEAD_LOGGING Database open flag: when set, the database is opened with write-ahead logging enabled by default.
int MODE_MULTI_PROCESS This constant was deprecated in API level 23. MODE_MULTI_PROCESS does not work reliably in some versions of Android, and furthermore does not provide any mechanism for reconciling concurrent modifications across processes. Applications should not attempt to use it. Instead, they should use an explicit cross-process data management approach such asContentProvider.
int MODE_PRIVATE File creation mode: the default mode, where the created file can only be accessed by the calling application (or all applications sharing the same user ID).
int MODE_WORLD_READABLE This constant was deprecated in API level 17. Creating world-readable files is very dangerous, and likely to cause security holes in applications. It is strongly discouraged; instead, applications should use more formal mechanism for interactions such as ContentProvider,BroadcastReceiver, and Service. There are no guarantees that this access mode will remain on a file, such as when it goes through a backup and restore. File creation mode: allow all other applications to have read access to the created file.
int MODE_WORLD_WRITEABLE This constant was deprecated in API level 17. Creating world-writable files is very dangerous, and likely to cause security holes in applications. It is strongly discouraged; instead, applications should use more formal mechanism for interactions such as ContentProvider,BroadcastReceiver, and Service. There are no guarantees that this access mode will remain on a file, such as when it goes through a backup and restore. File creation mode: allow all other applications to have write access to the created file.
String NETWORK_STATS_SERVICE Use with getSystemService(Class) to retrieve a NetworkStatsManagerfor querying network usage stats.
String NFC_SERVICE Use with getSystemService(Class) to retrieve a NfcManager for using NFC.
String NOTIFICATION_SERVICE Use with getSystemService(Class) to retrieve a NotificationManagerfor informing the user of background events.
String NSD_SERVICE Use with getSystemService(Class) to retrieve a NsdManager for handling management of network service discovery
String POWER_SERVICE Use with getSystemService(Class) to retrieve a PowerManager for controlling power management, including "wake locks," which let you keep the device on while you're running long tasks.
String PRINT_SERVICE PrintManager for printing and managing printers and print tasks.
String RESTRICTIONS_SERVICE Use with getSystemService(Class) to retrieve a RestrictionsManagerfor retrieving application restrictions and requesting permissions for restricted operations.
String SEARCH_SERVICE Use with getSystemService(Class) to retrieve a SearchManager for handling searches.
String SENSOR_SERVICE Use with getSystemService(Class) to retrieve a SensorManager for accessing sensors.
String STORAGE_SERVICE Use with getSystemService(Class) to retrieve a StorageManager for accessing system storage functions.
String TELECOM_SERVICE Use with getSystemService(Class) to retrieve a TelecomManager to manage telecom-related features of the device.
String TELEPHONY_SERVICE Use with getSystemService(Class) to retrieve a TelephonyManager for handling management the telephony features of the device.
String TELEPHONY_SUBSCRIPTION_SERVICE Use with getSystemService(Class) to retrieve a SubscriptionManagerfor handling management the telephony subscriptions of the device.
String TEXT_SERVICES_MANAGER_SERVICE Use with getSystemService(Class) to retrieve a TextServicesManagerfor accessing text services.
String TV_INPUT_SERVICE Use with getSystemService(Class) to retrieve a TvInputManager for interacting with TV inputs on the device.
String UI_MODE_SERVICE Use with getSystemService(Class) to retrieve a UiModeManager for controlling UI modes.
String USAGE_STATS_SERVICE Use with getSystemService(Class) to retrieve a UsageStatsManagerfor querying device usage stats.
String USB_SERVICE Use with getSystemService(Class) to retrieve a UsbManager for access to USB devices (as a USB host) and for controlling this device's behavior as a USB device.
String USER_SERVICE Use with getSystemService(Class) to retrieve a UserManager for managing users on devices that support multiple users.
String VIBRATOR_SERVICE Use with getSystemService(Class) to retrieve a Vibrator for interacting with the vibration hardware.
String WALLPAPER_SERVICE Use with getSystemService(Class) to retrieve a com.android.server.WallpaperService for accessing wallpapers.
String WIFI_P2P_SERVICE Use with getSystemService(Class) to retrieve a WifiP2pManager for handling management of Wi-Fi peer-to-peer connections.
String WIFI_SERVICE Use with getSystemService(Class) to retrieve a WifiManager for handling management of Wi-Fi access.
String WINDOW_SERVICE Use with getSystemService(Class) to retrieve a WindowManager for accessing the system's window manager.
 
English is poor, some word can not clear understand what's mean. so I list some think properly important.

AccessibilityManager
ActivityManager
AlarmManager
AudioManager
BatteryManager
BluetoothManager
CameraManager
ClipboardManager
DisplayManager
DownloadManager
FingerprintManager
InputManager
NotificationManager
LayoutInflater
LocationManager
NetworkStatsManager
NfcManager
PowerManager
SensorManager
StorageManager
UiModeManager
UsbManager
UserManager
WifiP2pManager
WifiManager
WindowManager

a huge army can control android world! with the callback. It can do anything in this world!  the system can hold more and receive more. 

let's do the same work like before. Check its methods.

Public Methods
abstract boolean
bindService( Intent  service,   ServiceConnection  conn, int flags)
Connect to an application service, creating it if needed.
abstract int
checkCallingOrSelfPermission( String  permission)
Determine whether the calling process of an IPC   or you  have been granted a particular permission.
abstract int
checkCallingOrSelfUriPermission( Uri  uri, int modeFlags)
Determine whether the calling process of an IPC   or you  has been granted permission to access a specific URI.
abstract int
checkCallingPermission( String  permission)
Determine whether the calling process of an IPC you are handling has been granted a particular permission.
abstract int
checkCallingUriPermission( Uri  uri, int modeFlags)
Determine whether the calling process and user ID has been granted permission to access a specific URI.
abstract int
checkPermission( String  permission, int pid, int uid)
Determine whether the given permission is allowed for a particular process and user ID running in the system.
abstract int
checkSelfPermission( String  permission)
Determine whether   you  have been granted a particular permission.
abstract int
checkUriPermission( Uri  uri, int pid, int uid, int modeFlags)
Determine whether a particular process and user ID has been granted permission to access a specific URI.
abstract int
checkUriPermission( Uri  uri,   String  readPermission,   String  writePermission, int pid, int uid, int modeFlags)
Check both a Uri and normal permission.
abstract void
clearWallpaper()
This method was deprecated in API level 5. Use WallpaperManager.clear() instead.

This method requires the caller to hold the permission SET_WALLPAPER.

abstract   Context
createConfigurationContext( Configuration  overrideConfiguration)
Return a new Context object for the current Context but whose resources are adjusted to match the given Configuration.
abstract   Context
createDisplayContext( Display  display)
Return a new Context object for the current Context but whose resources are adjusted to match the metrics of the given Display.
abstract   Context
createPackageContext( String  packageName, int flags)
Return a new Context object for the given application name.
abstract   String[]
databaseList()
Returns an array of strings naming the private databases associated with this Context's application package.
abstract boolean
deleteDatabase( String  name)
Delete an existing private SQLiteDatabase associated with this Context's application package.
abstract boolean
deleteFile( String  name)
Delete the given private file associated with this Context's application package.
abstract void
enforceCallingOrSelfPermission( String  permission,   String  message)
If neither you nor the calling process of an IPC you are handling has been granted a particular permission, throw a   SecurityException.
abstract void
enforceCallingOrSelfUriPermission( Uri  uri, int modeFlags,   String  message)
If the calling process of an IPC   or you  has not been granted permission to access a specific URI, throw   SecurityException.
abstract void
enforceCallingPermission( String  permission,   String  message)
If the calling process of an IPC you are handling has not been granted a particular permission, throw a   SecurityException.
abstract void
enforceCallingUriPermission( Uri  uri, int modeFlags,   String  message)
If the calling process and user ID has not been granted permission to access a specific URI, throw   SecurityException.
abstract void
enforcePermission( String  permission, int pid, int uid,   String  message)
If the given permission is not allowed for a particular process and user ID running in the system, throw a   SecurityException.
abstract void
enforceUriPermission( Uri  uri, int pid, int uid, int modeFlags,   String  message)
If a particular process and user ID has not been granted permission to access a specific URI, throw   SecurityException.
abstract void
enforceUriPermission( Uri  uri,   String  readPermission,   String  writePermission, int pid, int uid, int modeFlags,   String  message)
Enforce both a Uri and normal permission.
abstract   String[]
fileList()
Returns an array of strings naming the private files associated with this Context's application package.
abstract   Context
getApplicationContext()
Return the context of the single, global Application object of the current process.
abstract   ApplicationInfo
getApplicationInfo()
Return the full application info for this context's package.
abstract   AssetManager
getAssets()
Return an AssetManager instance for your application's package.
abstract   File
getCacheDir()
Returns the absolute path to the application specific cache directory on the filesystem.
abstract   ClassLoader
getClassLoader()
Return a class loader you can use to retrieve classes in this package.
abstract   File
getCodeCacheDir()
Returns the absolute path to the application specific cache directory on the filesystem designed for storing cached code.
final int
getColor(int id)
Returns a color associated with a particular resource ID and styled for the current theme.
final   ColorStateList
getColorStateList(int id)
Returns a color state list associated with a particular resource ID and styled for the current theme.
abstract   ContentResolver
getContentResolver()
Return a ContentResolver instance for your application's package.
abstract   File
getDatabasePath( String  name)
Returns the absolute path on the filesystem where a database created with   openOrCreateDatabase(String, int, SQLiteDatabase.CursorFactory)  is stored.
abstract   File
getDir( String  name, int mode)
Retrieve, creating if needed, a new directory in which the application can place its own custom data files.
final   Drawable
getDrawable(int id)
Returns a drawable object associated with a particular resource ID and styled for the current theme.
abstract   File
getExternalCacheDir()
Returns absolute path to application-specific directory on the primary shared/external storage device where the application can place cache files it owns.
abstract   File[]
getExternalCacheDirs()
Returns absolute paths to application-specific directories on all shared/external storage devices where the application can place cache files it owns.
abstract   File
getExternalFilesDir( String  type)
Returns the absolute path to the directory on the primary shared/external storage device where the application can place persistent files it owns.
abstract   File[]
getExternalFilesDirs( String  type)
Returns absolute paths to application-specific directories on all shared/external storage devices where the application can place persistent files it owns.
abstract   File[]
getExternalMediaDirs()
Returns absolute paths to application-specific directories on all shared/external storage devices where the application can place media files.
abstract   File
getFileStreamPath( String  name)
Returns the absolute path on the filesystem where a file created with   openFileOutput(String, int)  is stored.
abstract   File
getFilesDir()
Returns the absolute path to the directory on the filesystem where files created with   openFileOutput(String, int)  are stored.
abstract   Looper
getMainLooper()
Return the Looper for the main thread of the current process.
abstract   File
getNoBackupFilesDir()
Returns the absolute path to the directory on the filesystem similar to   getFilesDir().
abstract   File
getObbDir()
Return the primary shared/external storage directory where this application's OBB files (if there are any) can be found.
abstract   File[]
getObbDirs()
Returns absolute paths to application-specific directories on all shared/external storage devices where the application's OBB files (if there are any) can be found.
abstract   String
getPackageCodePath()
Return the full path to this context's primary Android package.
abstract   PackageManager
getPackageManager()
Return PackageManager instance to find global package information.
abstract   String
getPackageName()
Return the name of this application's package.
abstract   String
getPackageResourcePath()
Return the full path to this context's primary Android package.
abstract   Resources
getResources()
Return a Resources instance for your application's package.
abstract   SharedPreferences
getSharedPreferences( String  name, int mode)
Retrieve and hold the contents of the preferences file 'name', returning a SharedPreferences through which you can retrieve and modify its values.
final   String
getString(int resId)
Returns a localized string from the application's package's default string table.
final   String
getString(int resId,   Object...  formatArgs)
Returns a localized formatted string from the application's package's default string table, substituting the format arguments as defined in   Formatter  and   format(String, Object...).
final <T> T
getSystemService( Class<T> serviceClass)
Return the handle to a system-level service by class.
abstract   Object
getSystemService( String  name)
Return the handle to a system-level service by name.
abstract   String
getSystemServiceName( Class<?> serviceClass)
Gets the name of the system-level service that is represented by the specified class.
final   CharSequence
getText(int resId)
Return a localized, styled CharSequence from the application's package's default string table.
abstract   Resources.Theme
getTheme()
Return the Theme object associated with this Context.
abstract   Drawable
getWallpaper()
This method was deprecated in API level 5. Use WallpaperManager.get() instead.
abstract int
getWallpaperDesiredMinimumHeight()
This method was deprecated in API level 5. Use WallpaperManager.getDesiredMinimumHeight() instead.
abstract int
getWallpaperDesiredMinimumWidth()
This method was deprecated in API level 5. Use WallpaperManager.getDesiredMinimumWidth() instead.
abstract void
grantUriPermission( String  toPackage,   Uri  uri, int modeFlags)
Grant permission to access a specific Uri to another package, regardless of whether that package has general permission to access the Uri's content provider.
boolean
isRestricted()
Indicates whether this Context is restricted.
final   TypedArray
obtainStyledAttributes(int[] attrs)
Retrieve styled attribute information in this Context's theme.
final   TypedArray
obtainStyledAttributes( AttributeSet  set, int[] attrs, int defStyleAttr, int defStyleRes)
Retrieve styled attribute information in this Context's theme.
final   TypedArray
obtainStyledAttributes( AttributeSet  set, int[] attrs)
Retrieve styled attribute information in this Context's theme.
final   TypedArray
obtainStyledAttributes(int resid, int[] attrs)
Retrieve styled attribute information in this Context's theme.
abstract   FileInputStream
openFileInput( String  name)
Open a private file associated with this Context's application package for reading.
abstract   FileOutputStream
openFileOutput( String  name, int mode)
Open a private file associated with this Context's application package for writing.
abstract   SQLiteDatabase
openOrCreateDatabase( String  name, int mode,   SQLiteDatabase.CursorFactory  factory)
Open a new private SQLiteDatabase associated with this Context's application package.
abstract   SQLiteDatabase
openOrCreateDatabase( String  name, int mode,   SQLiteDatabase.CursorFactory  factory,   DatabaseErrorHandler  errorHandler)
Open a new private SQLiteDatabase associated with this Context's application package.
abstract   Drawable
peekWallpaper()
This method was deprecated in API level 5. Use WallpaperManager.peek() instead.
void
registerComponentCallbacks( ComponentCallbacks  callback)
Add a new   ComponentCallbacks  to the base application of the Context, which will be called at the same times as the ComponentCallbacks methods of activities and other components are called.
abstract   Intent
registerReceiver( BroadcastReceiver  receiver,   IntentFilter  filter)
Register a BroadcastReceiver to be run in the main activity thread.
abstract   Intent
registerReceiver( BroadcastReceiver  receiver,   IntentFilter  filter,   String  broadcastPermission,   Handler  scheduler)
Register to receive intent broadcasts, to run in the context of   scheduler.
abstract void
removeStickyBroadcast( Intent  intent)
This method was deprecated in API level 21. Sticky broadcasts should not be used. They provide no security (anyone can access them), no protection (anyone can modify them), and many other problems. The recommended pattern is to use a non-sticky broadcast to report that something has changed, with another mechanism for apps to retrieve the current value whenever desired.
abstract void
removeStickyBroadcastAsUser( Intent  intent,   UserHandle  user)
This method was deprecated in API level 21. Sticky broadcasts should not be used. They provide no security (anyone can access them), no protection (anyone can modify them), and many other problems. The recommended pattern is to use a non-sticky broadcast to report that something has changed, with another mechanism for apps to retrieve the current value whenever desired.
abstract void
revokeUriPermission( Uri  uri, int modeFlags)
Remove all permissions to access a particular content provider Uri that were previously added with   grantUriPermission(String, Uri, int).
abstract void
sendBroadcast( Intent  intent,   String  receiverPermission)
Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced.
abstract void
sendBroadcast( Intent  intent)
Broadcast the given intent to all interested BroadcastReceivers.
abstract void
sendBroadcastAsUser( Intent  intent,   UserHandle  user)
Version of   sendBroadcast(Intent)  that allows you to specify the user the broadcast will be sent to.
abstract void
sendBroadcastAsUser( Intent  intent,   UserHandle  user,   String  receiverPermission)
Version of   sendBroadcast(Intent, String)  that allows you to specify the user the broadcast will be sent to.
abstract void
sendOrderedBroadcast( Intent  intent,   String  receiverPermission,   BroadcastReceiver  resultReceiver,   Handler  scheduler, int initialCode,   String  initialData,   Bundle  initialExtras)
Version of   sendBroadcast(Intent)  that allows you to receive data back from the broadcast.
abstract void
sendOrderedBroadcast( Intent  intent,   String  receiverPermission)
Broadcast the given intent to all interested BroadcastReceivers, delivering them one at a time to allow more preferred receivers to consume the broadcast before it is delivered to less preferred receivers.
abstract void
sendOrderedBroadcastAsUser( Intent  intent,   UserHandle  user,   String  receiverPermission,   BroadcastReceiver  resultReceiver,   Handler  scheduler, int initialCode,   String  initialData,   Bundle  initialExtras)
Version of   sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)  that allows you to specify the user the broadcast will be sent to.
abstract void
sendStickyBroadcast( Intent  intent)
This method was deprecated in API level 21. Sticky broadcasts should not be used. They provide no security (anyone can access them), no protection (anyone can modify them), and many other problems. The recommended pattern is to use a non-sticky broadcast to report that something has changed, with another mechanism for apps to retrieve the current value whenever desired.
abstract void
sendStickyBroadcastAsUser( Intent  intent,   UserHandle  user)
This method was deprecated in API level 21. Sticky broadcasts should not be used. They provide no security (anyone can access them), no protection (anyone can modify them), and many other problems. The recommended pattern is to use a non-sticky broadcast to report that something has changed, with another mechanism for apps to retrieve the current value whenever desired.
abstract void
sendStickyOrderedBroadcast( Intent  intent,   BroadcastReceiver  resultReceiver,   Handler  scheduler, int initialCode,   String  initialData,   Bundle  initialExtras)
This method was deprecated in API level 21. Sticky broadcasts should not be used. They provide no security (anyone can access them), no protection (anyone can modify them), and many other problems. The recommended pattern is to use a non-sticky broadcast to report that something has changed, with another mechanism for apps to retrieve the current value whenever desired.
abstract void
sendStickyOrderedBroadcastAsUser( Intent  intent,   UserHandle  user,   BroadcastReceiver  resultReceiver,   Handler  scheduler, int initialCode,   String  initialData,   Bundle  initialExtras)
This method was deprecated in API level 21. Sticky broadcasts should not be used. They provide no security (anyone can access them), no protection (anyone can modify them), and many other problems. The recommended pattern is to use a non-sticky broadcast to report that something has changed, with another mechanism for apps to retrieve the current value whenever desired.
abstract void
setTheme(int resid)
Set the base theme for this context.
abstract void
setWallpaper( InputStream  data)
This method was deprecated in API level 5. Use WallpaperManager.set() instead.

This method requires the caller to hold the permission SET_WALLPAPER.

abstract void
setWallpaper( Bitmap  bitmap)
This method was deprecated in API level 5. Use WallpaperManager.set() instead.

This method requires the caller to hold the permission SET_WALLPAPER.

abstract void
startActivities( Intent[]  intents,   Bundle  options)
Launch multiple new activities.
abstract void
startActivities( Intent[]  intents)
Same as   startActivities(Intent[], Bundle)  with no options specified.
abstract void
startActivity( Intent  intent)
Same as   startActivity(Intent, Bundle)  with no options specified.
abstract void
startActivity( Intent  intent,   Bundle  options)
Launch a new activity.
abstract boolean
startInstrumentation( ComponentName  className,   String  profileFile,   Bundle  arguments)
Start executing an   Instrumentation  class.
abstract void
startIntentSender( IntentSender  intent,   Intent  fillInIntent, int flagsMask, int flagsValues, int extraFlags,   Bundle  options)
Like   startActivity(Intent, Bundle), but taking a IntentSender to start.
abstract void
startIntentSender( IntentSender  intent,   Intent  fillInIntent, int flagsMask, int flagsValues, int extraFlags)
Same as   startIntentSender(IntentSender, Intent, int, int, int, Bundle)  with no options specified.
abstract   ComponentName
startService( Intent  service)
Request that a given application service be started.
abstract boolean
stopService( Intent  service)
Request that a given application service be stopped.
abstract void
unbindService( ServiceConnection  conn)
Disconnect from an application service.
void
unregisterComponentCallbacks( ComponentCallbacks  callback)
Remove a   ComponentCallbacks  object that was previously registered with   registerComponentCallbacks(ComponentCallbacks).
abstract void
unregisterReceiver( BroadcastReceiver  receiver)
Unregister a previously registered BroadcastReceiver.

to be honest, I do not like one by one to see how powerful android is. but have to say, I found something I never seen. like that.

bindService(Intent service, ServiceConnection conn, int flags)
checkPermission(String permission, int pid, int uid)
databaseList()
deleteDatabase(String name)
enforcePermission(String permission, int pid, int uid, String message)
getApplicationContext()
getClassLoader()
getDatabasePath(String name)
getPackageCodePath()
getPackageName()
getResources()
getSystemService(Class<T> serviceClass)
registerReceiver(BroadcastReceiver receiver, IntentFilter filter)
sendBroadcast(Intent intent, String receiverPermission)
startActivities(Intent[] intents)


like  checkPermission ( String  permission, int pid, int uid) and enforcePermission(String permission, int pid, int uid, String message) 
now I can understand why Manifest.xml need user permission added. class android.content.Context will check permission. but at the same time I know some method about enforce permission. Does it mean permission can pass away, like a hacker? oh! can not image this happen. I think google engineers can solve this. 
end time : 2016-1-21 21:58:16, need to rest. my boss wake up at 6:30 am so I need more time to store energy.  I wish become his arm not bother. I hope I can help him something, and to myself. maybe tomorrow I need research how KeyEvent transfer to OS then showed at screen. all right. tomorrow night.

I'm fish, I'm on.
----jack chen

你可能感兴趣的:(api,context)