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
|
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
()
|
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
ContentResolver
|
getContentResolver
()
Return a ContentResolver instance for your application's package.
|
abstract
File
|
getDatabasePath
(
String
name)
|
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.
|
abstract
File
|
getExternalCacheDir
()
|
abstract
File[]
|
getExternalCacheDirs
()
Returns absolute paths to application-specific directories on all
external storage devices where the application can place cache files it
owns.
|
abstract
File
|
getExternalFilesDir
(
String
type)
|
abstract
File[]
|
getExternalFilesDirs
(
String
type)
Returns absolute paths to application-specific directories on all
external storage devices where the application can place persistent files
it owns.
|
abstract
File
|
getFileStreamPath
(
String
name)
|
abstract
File
|
getFilesDir
()
|
abstract
Looper
|
getMainLooper
()
Return the Looper for the main thread of the current process.
|
abstract
File
|
getObbDir
()
Return the primary 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
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)
Return a localized string from the application's package's
default string table.
|
final
String
|
getString
(int resId,
Object...
formatArgs)
Return 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...)
.
|
abstract
Object
|
getSystemService
(
String
name)
Return the handle to a system-level service by name.
|
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
()
|
abstract
int
|
getWallpaperDesiredMinimumHeight
()
|
abstract
int
|
getWallpaperDesiredMinimumWidth
()
|
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
()
|
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)
|
abstract
void
|
removeStickyBroadcastAsUser
(
Intent
intent,
UserHandle
user)
|
abstract
void
|
revokeUriPermission
(
Uri
uri, int modeFlags)
|
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)
|
abstract
void
|
sendBroadcastAsUser
(
Intent
intent,
UserHandle
user,
String
receiverPermission)
|
abstract
void
|
sendOrderedBroadcast
(
Intent
intent,
String
receiverPermission,
BroadcastReceiver
resultReceiver,
Handler
scheduler, int initialCode,
String
initialData,
Bundle
initialExtras)
|
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)
|
abstract
void
|
sendStickyBroadcast
(
Intent
intent)
|
abstract
void
|
sendStickyBroadcastAsUser
(
Intent
intent,
UserHandle
user)
|
abstract
void
|
sendStickyOrderedBroadcast
(
Intent
intent,
BroadcastReceiver
resultReceiver,
Handler
scheduler, int initialCode,
String
initialData,
Bundle
initialExtras)
|
abstract
void
|
sendStickyOrderedBroadcastAsUser
(
Intent
intent,
UserHandle
user,
BroadcastReceiver
resultReceiver,
Handler
scheduler, int initialCode,
String
initialData,
Bundle
initialExtras)
|
abstract
void
|
setTheme
(int resid)
Set the base theme for this context.
|
abstract
void
|
setWallpaper
(
InputStream
data)
|
abstract
void
|
setWallpaper
(
Bitmap
bitmap)
|
abstract
void
|
startActivities
(
Intent[]
intents,
Bundle
options)
Launch multiple new activities.
|
abstract
void
|
startActivities
(
Intent[]
intents)
|
abstract
void
|
startActivity
(
Intent
intent)
|
abstract
void
|
startActivity
(
Intent
intent,
Bundle
options)
Launch a new activity.
|
abstract
boolean
|
startInstrumentation
(
ComponentName
className,
String
profileFile,
Bundle
arguments)
|
abstract
void
|
startIntentSender
(
IntentSender
intent,
Intent
fillInIntent, int flagsMask, int flagsValues, int extraFlags,
Bundle
options)
|
abstract
void
|
startIntentSender
(
IntentSender
intent,
Intent
fillInIntent, int flagsMask, int flagsValues, int extraFlags)
|
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)
|
abstract
void
|
unregisterReceiver
(
BroadcastReceiver
receiver)
Unregister a previously registered BroadcastReceiver.
|