Stub activity that launches another activity (and then finishes itself) based on information in its component's manifest meta-data. This is a simple way to implement an alias-like mechanism.
Value | ||||
---|---|---|---|---|
int | DEFAULT_KEYS_DIALER | Use with setDefaultKeyMode(int) to launch the dialer during default key handling. | 1 | 0x00000001 |
int | DEFAULT_KEYS_DISABLE | Use with setDefaultKeyMode(int) to turn off default handling of keys. | 0 | 0x00000000 |
int | DEFAULT_KEYS_SEARCH_GLOBAL | Use with setDefaultKeyMode(int) to specify that unhandled keystrokes
will start a global search (typically web search, but some platforms may define alternate
methods for global search)
See android.app.SearchManager for more details. |
4 | 0x00000004 |
int | DEFAULT_KEYS_SEARCH_LOCAL | Use with setDefaultKeyMode(int) to specify that unhandled keystrokes will start an application-defined search. | 3 | 0x00000003 |
int | DEFAULT_KEYS_SHORTCUT | Use with setDefaultKeyMode(int) to execute a menu shortcut in default key handling. | 2 | 0x00000002 |
int[] | FOCUSED_STATE_SET | |||
int | RESULT_CANCELED | Standard activity result: operation canceled. | 0 | 0x00000000 |
int | RESULT_FIRST_USER | Start of user-defined activity results. | 1 | 0x00000001 |
int | RESULT_OK | Standard activity result: operation succeeded. | -1 | 0xffffffff |
Value | ||||
---|---|---|---|---|
String | ACTIVITY_SERVICE | Use with getSystemService(String) to retrieve a ActivityManager for interacting with the global system state. | "activity" | |
String | ALARM_SERVICE | Use with getSystemService(String) to retrieve a AlarmManager for receiving intents at a time of your choosing. | "alarm" | |
String | AUDIO_SERVICE | Use with getSystemService(String) to retrieve a AudioManager for handling management of volume, ringer modes and audio routing. | "audio" | |
int | BIND_AUTO_CREATE | Flag for bindService(Intent, ServiceConnection, int): automatically create the service as long as the binding exists. | 1 | 0x00000001 |
int | BIND_DEBUG_UNBIND | Flag for bindService(Intent, ServiceConnection, int): include debugging help for mismatched calls to unbind. | 2 | 0x00000002 |
String | CLIPBOARD_SERVICE | Use with getSystemService(String) to retrieve a ClipboardManager for accessing and modifying the contents of the global clipboard. | "clipboard" | |
String | CONNECTIVITY_SERVICE | Use with getSystemService(String) to retrieve a ConnectivityManager for handling management of network connections. | "connectivity" | |
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. | 2 | 0x00000002 |
int | CONTEXT_INCLUDE_CODE | Flag for use with createPackageContext(String, int): include the application code with the context. | 1 | 0x00000001 |
String | KEYGUARD_SERVICE | Use with getSystemService(String) to retrieve a NotificationManager for controlling keyguard. | "keyguard" | |
String | LAYOUT_INFLATER_SERVICE | Use with getSystemService(String) to retrieve a LayoutInflater for inflating layout resources in this context. | "layout_inflater" | |
String | LOCATION_SERVICE | Use with getSystemService(String) to retrieve a LocationManager for controlling location updates. | "location" | |
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. | 32768 | 0x00008000 |
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). | 0 | 0x00000000 |
int | MODE_WORLD_READABLE | File creation mode: allow all other applications to have read access to the created file. | 1 | 0x00000001 |
int | MODE_WORLD_WRITEABLE | File creation mode: allow all other applications to have write access to the created file. | 2 | 0x00000002 |
String | NOTIFICATION_SERVICE | Use with getSystemService(String) to retrieve a NotificationManager for informing the user of background events. | "notification" | |
String | POWER_SERVICE | Use with getSystemService(String) to retrieve a PowerManager for controlling power management, including "wake locks," which let you keep the device on while you're running long tasks. | "power" | |
String | SEARCH_SERVICE | Use with getSystemService(String) to retrieve a SearchManager for handling searches. | "search" | |
String | SENSOR_SERVICE | Use with getSystemService(String) to retrieve a SensorManager for accessing sensors. | "sensor" | |
String | TELEPHONY_SERVICE | Use with getSystemService(String) to retrieve a TelephonyManager for handling management the telephony features of the device. | "phone" | |
String | VIBRATOR_SERVICE | Use with getSystemService(String) to retrieve a Vibrator for interacting with the vibration hardware. | "vibrator" | |
String | WALLPAPER_SERVICE | Use with getSystemService(String) to retrieve a com.android.server.WallpaperService for accessing wallpapers. | "wallpaper" | |
String | WIFI_SERVICE | Use with getSystemService(String) to retrieve a WifiManager for handling management of Wi-Fi access. | "wifi" | |
String | WINDOW_SERVICE | Use with getSystemService(String) to retrieve a WindowManager for accessing the system's window manager. | "window" |
public | final | String | ALIAS_META_DATA | This is the name under which you should store in your component the meta-data information about the alias. |
AliasActivity() |
void | onCreate(Bundle savedInstanceState) | |||||
Called when the activity is starting. |
void | addContentView(View view, ViewGroup.LayoutParams params) | |||||
Add an additional content view to the activity. | ||||||
void | closeOptionsMenu() | |||||
Progammatically closes the options menu. | ||||||
PendingIntent | createPendingResult(int requestCode, Intent data, int flags) | |||||
Create a new PendingIntent object which you can hand to others for them to use to send result data back to your onActivityResult(int, int, Intent) callback. | ||||||
final | void | dismissDialog(int id) | ||||
Dismiss a dialog that was previously shown via showDialog(int). | ||||||
boolean | dispatchKeyEvent(KeyEvent event) | |||||
Called to process key events. | ||||||
boolean | dispatchTouchEvent(MotionEvent ev) | |||||
Called to process touch screen events. | ||||||
boolean | dispatchTrackballEvent(MotionEvent ev) | |||||
Called to process trackball events. | ||||||
void | finalize() | |||||
Called by the virtual machine when there are no longer any (non-weak) references to the receiver. | ||||||
View | findViewById(int id) | |||||
Finds a view that was identified by the id attribute from the XML that was processed in onCreate(Bundle). | ||||||
void | finish() | |||||
Call this when your activity is done and should be closed. | ||||||
void | finishActivity(int requestCode) | |||||
Force finish another activity that you had previously started with startActivityForResult(Intent, int). | ||||||
void | finishActivityFromChild(Activity child, int requestCode) | |||||
This is called when a child activity of this one calls its finishActivity(). | ||||||
void | finishFromChild(Activity child) | |||||
This is called when a child activity of this one calls its finish() method. | ||||||
final | Application | getApplication() | ||||
Return the application that owns this activity. | ||||||
ComponentName | getCallingActivity() | |||||
Return the name of the activity that invoked this activity. | ||||||
String | getCallingPackage() | |||||
Return the name of the package that invoked this activity. | ||||||
int | getChangingConfigurations() | |||||
If this activity is being destroyed because it can not handle a configuration parameter being changed (and thus its onConfigurationChanged(Configuration) method is not being called), then you can use this method to discover the set of changes that have occurred while in the process of being destroyed. | ||||||
ComponentName | getComponentName() | |||||
Returns complete component name of this activity. | ||||||
View | getCurrentFocus() | |||||
Calls getCurrentFocus() on the Window of this Activity to return the currently focused view. | ||||||
static | long | getInstanceCount() | ||||
Intent | getIntent() | |||||
Return the intent that started this activity. | ||||||
Object | getLastNonConfigurationInstance() | |||||
Retrieve the non-configuration instance data that was previously returned by onRetainNonConfigurationInstance(). | ||||||
LayoutInflater | getLayoutInflater() | |||||
Convenience for calling getLayoutInflater(). | ||||||
String | getLocalClassName() | |||||
Returns class name for this activity with the package prefix removed. | ||||||
MenuInflater | getMenuInflater() | |||||
Returns a MenuInflater with this context. | ||||||
final | Activity | getParent() | ||||
Return the parent activity if this view is an embedded child. | ||||||
SharedPreferences | getPreferences(int mode) | |||||
Retrieve a SharedPreferences object for accessing preferences that are private to this activity. | ||||||
int | getRequestedOrientation() | |||||
Return the current requested orientation of the activity. | ||||||
Object | getSystemService(String name) | |||||
Return the handle to a system-level service by name. | ||||||
int | getTaskId() | |||||
Return the identifier of the task this activity is in. | ||||||
final | CharSequence | getTitle() | ||||
final | int | getTitleColor() | ||||
final | int | getVolumeControlStream() | ||||
Gets the suggested audio stream whose volume should be changed by the harwdare volume controls. | ||||||
int | getWallpaperDesiredMinimumHeight() | |||||
Returns the desired minimum height for the wallpaper. | ||||||
int | getWallpaperDesiredMinimumWidth() | |||||
Returns the desired minimum width for the wallpaper. | ||||||
Window | getWindow() | |||||
Retrieve the current Window for the activity. | ||||||
WindowManager | getWindowManager() | |||||
Retrieve the window manager for showing custom windows. | ||||||
final | boolean | isChild() | ||||
Is this activity embedded inside of another activity? | ||||||
boolean | isFinishing() | |||||
Check to see whether this activity is in the process of finishing, either because you called finish() on it or someone else has requested that it finished. | ||||||
boolean | isTaskRoot() | |||||
Return whether this activity is the root of a task. | ||||||
final | Cursor | managedQuery(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) | ||||
Wrapper around query(android.net.Uri, String[], String, String[], String) that gives the resulting Cursor to call startManagingCursor(Cursor) so that the activity will manage its lifecycle for you. | ||||||
boolean | moveTaskToBack(boolean nonRoot) | |||||
Move the task containing this activity to the back of the activity stack. | ||||||
void | onActivityResult(int requestCode, int resultCode, Intent data) | |||||
Called when an activity you launched exits, giving you the requestCode you started it with, the resultCode it returned, and any additional data from it. | ||||||
void | onApplyThemeResource(Resources.Theme theme, int resid, boolean first) | |||||
Called by setTheme(int) and getTheme() to apply a theme resource to the current Theme object. | ||||||
void | onChildTitleChanged(Activity childActivity, CharSequence title) | |||||
void | onConfigurationChanged(Configuration newConfig) | |||||
Called by the system when the device configuration changes while your activity is running. | ||||||
void | onContentChanged() | |||||
This hook is called whenever the content view of the screen changes (due to a call to setContentView(). | ||||||
boolean | onContextItemSelected(MenuItem item) | |||||
This hook is called whenever an item in a context menu is selected. | ||||||
void | onContextMenuClosed(Menu menu) | |||||
This hook is called whenever the context menu is being closed (either by the user canceling the menu with the back/menu button, or when an item is selected). | ||||||
void | onCreate(Bundle savedInstanceState) | |||||
Called when the activity is starting. | ||||||
void | onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) | |||||
Called when a context menu for the view is about to be shown. |
||||||
CharSequence | onCreateDescription() | |||||
Generate a new description for this activity. | ||||||
Dialog | onCreateDialog(int id) | |||||
Callback for creating dialogs that are managed (saved and restored) for you by the activity. | ||||||
boolean | onCreateOptionsMenu(Menu menu) | |||||
Initialize the contents of the Activity's standard options menu. | ||||||
boolean | onCreatePanelMenu(int featureId, Menu menu) | |||||
Default implementation of onCreatePanelMenu(int, Menu) for activities. | ||||||
View | onCreatePanelView(int featureId) | |||||
Default implementation of onCreatePanelView(int) for activities. | ||||||
boolean | onCreateThumbnail(Bitmap outBitmap, Canvas canvas) | |||||
Generate a new thumbnail for this activity. | ||||||
View | onCreateView(String name, Context context, AttributeSet attrs) | |||||
Stub implementation of onCreateView(String, Context, AttributeSet) used when inflating with the LayoutInflater returned by getSystemService(String). | ||||||
void | onDestroy() | |||||
Perform any final cleanup before an activity is destroyed. | ||||||
boolean | onKeyDown(int keyCode, KeyEvent event) | |||||
Called when a key was pressed down and not handled by any of the views inside of the activity. | ||||||
boolean | onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) | |||||
Default implementation of KeyEvent.Callback.onKeyMultiple(): always returns false (doesn't handle the event). | ||||||
boolean | onKeyUp(int keyCode, KeyEvent event) | |||||
Called when a key was released and not handled by any of the views inside of the activity. | ||||||
void | onLowMemory() | |||||
This is called when the overall system is running low on memory, and would like actively running process to try to tighten their belt. | ||||||
boolean | onMenuItemSelected(int featureId, MenuItem item) | |||||
Default implementation of onMenuItemSelected(int, MenuItem) for activities. | ||||||
boolean | onMenuOpened(int featureId, Menu menu) | |||||
Called when a panel's menu is opened by the user. | ||||||
void | onNewIntent(Intent intent) | |||||
This is called for activities that set launchMode to "singleTop" in their package, or if a client used the FLAG_ACTIVITY_SINGLE_TOP flag when calling startActivity(Intent). | ||||||
boolean | onOptionsItemSelected(MenuItem item) | |||||
This hook is called whenever an item in your options menu is selected. | ||||||
void | onOptionsMenuClosed(Menu menu) | |||||
This hook is called whenever the options menu is being closed (either by the user canceling the menu with the back/menu button, or when an item is selected). | ||||||
void | onPanelClosed(int featureId, Menu menu) | |||||
Default implementation of onPanelClosed(int, Menu) for activities. | ||||||
void | onPause() | |||||
Called as part of the activity lifecycle when an activity is going into the background, but has not (yet) been killed. | ||||||
void | onPostCreate(Bundle savedInstanceState) | |||||
Called when activity start-up is complete (after onStart() and onRestoreInstanceState(Bundle) have been called). | ||||||
void | onPostResume() | |||||
Called when activity resume is complete (after onResume() has been called). | ||||||
void | onPrepareDialog(int id, Dialog dialog) | |||||
Provides an opportunity to prepare a managed dialog before it is being shown. | ||||||
boolean | onPrepareOptionsMenu(Menu menu) | |||||
Prepare the Screen's standard options menu to be displayed. | ||||||
boolean | onPreparePanel(int featureId, View view, Menu menu) | |||||
Default implementation of onPreparePanel(int, View, Menu) for activities. | ||||||
void | onRestart() | |||||
Called after onStart() when the current activity is being re-displayed to the user (the user has navigated back to it). | ||||||
void | onRestoreInstanceState(Bundle savedInstanceState) | |||||
This method is called after onStart() when the activity is being re-initialized from a previously saved state, given here in state. | ||||||
void | onResume() | |||||
Called after onRestoreInstanceState(Bundle), onRestart(), or onPause(), for your activity to start interacting with the user. | ||||||
Object | onRetainNonConfigurationInstance() | |||||
Called by the system, as part of destroying an activity due to a configuration change, when it is known that a new instance will immediately be created for the new configuration. | ||||||
void | onSaveInstanceState(Bundle outState) | |||||
Called to retrieve per-instance state from an activity before being killed so that the state can be restored in onCreate(Bundle) or onRestoreInstanceState(Bundle) (the Bundle populated by this method will be passed to both). | ||||||
boolean | onSearchRequested() | |||||
This hook is called when the user signals the desire to start a search. | ||||||
void | onStart() | |||||
Called after onCreate(Bundle) or onStop() when the current activity is now being displayed to the user. | ||||||
void | onStop() | |||||
Called when you are no longer visible to the user. | ||||||
void | onTitleChanged(CharSequence title, int color) | |||||
boolean | onTouchEvent(MotionEvent event) | |||||
Called when a touch screen event was not handled by any of the views under it. | ||||||
boolean | onTrackballEvent(MotionEvent event) | |||||
Called when the trackball was moved and not handled by any of the views inside of the activity. | ||||||
void | onWindowAttributesChanged(WindowManager.LayoutParams params) | |||||
This is called whenever the current window attributes change. | ||||||
void | onWindowFocusChanged(boolean hasFocus) | |||||
Called when the current Window of the activity gains or loses focus. | ||||||
void | openContextMenu(View view) | |||||
Programmatically opens the context menu for a particular view . |
||||||
void | openOptionsMenu() | |||||
Programmatically opens the options menu. | ||||||
void | registerForContextMenu(View view) | |||||
Registers a context menu to be shown for the given view (multiple views can show the context menu). | ||||||
final | void | removeDialog(int id) | ||||
Removes any internal references to a dialog managed by this Activity. | ||||||
final | boolean | requestWindowFeature(int featureId) | ||||
Enable extended window features. | ||||||
final | void | runOnUiThread(Runnable action) | ||||
Runs the specified action on the UI thread. | ||||||
void | setContentView(int layoutResID) | |||||
Set the activity content from a layout resource. | ||||||
void | setContentView(View view, ViewGroup.LayoutParams params) | |||||
Set the activity content to an explicit view. | ||||||
void | setContentView(View view) | |||||
Set the activity content to an explicit view. | ||||||
final | void | setDefaultKeyMode(int mode) | ||||
Select the default key handling for this activity. | ||||||
final | void | setFeatureDrawable(int featureId, Drawable drawable) | ||||
Convenience for calling setFeatureDrawable(int, Drawable). | ||||||
final | void | setFeatureDrawableAlpha(int featureId, int alpha) | ||||
Convenience for calling setFeatureDrawableAlpha(int, int). | ||||||
final | void | setFeatureDrawableResource(int featureId, int resId) | ||||
Convenience for calling setFeatureDrawableResource(int, int). | ||||||
final | void | setFeatureDrawableUri(int featureId, Uri uri) | ||||
Convenience for calling setFeatureDrawableUri(int, Uri). | ||||||
void | setIntent(Intent newIntent) | |||||
Change the intent returned by getIntent(). | ||||||
void | setPersistent(boolean isPersistent) | |||||
Control whether this activity is required to be persistent. | ||||||
final | void | setProgress(int progress) | ||||
Sets the progress for the progress bars in the title. | ||||||
final | void | setProgressBarIndeterminate(boolean indeterminate) | ||||
Sets whether the horizontal progress bar in the title should be indeterminate (the circular is always indeterminate). | ||||||
final | void | setProgressBarIndeterminateVisibility(boolean visible) | ||||
Sets the visibility of the indeterminate progress bar in the title. | ||||||
final | void | setProgressBarVisibility(boolean visible) | ||||
Sets the visibility of the progress bar in the title. | ||||||
void | setRequestedOrientation(int requestedOrientation) | |||||
Change the desired orientation of this activity. | ||||||
final | void | setResult(int resultCode, Intent data) | ||||
Call this to set the result that your activity will return to its caller. | ||||||
final | void | setResult(int resultCode) | ||||
Call this to set the result that your activity will return to its caller. | ||||||
final | void | setSecondaryProgress(int secondaryProgress) | ||||
Sets the secondary progress for the progress bar in the title. | ||||||
void | setTitle(int titleId) | |||||
Change the title associated with this activity. | ||||||
void | setTitle(CharSequence title) | |||||
Change the title associated with this activity. | ||||||
void | setTitleColor(int textColor) | |||||
final | void | setVolumeControlStream(int streamType) | ||||
Suggests an audio stream whose volume should be changed by the hardware volume controls. | ||||||
final | void | showDialog(int id) | ||||
Show a dialog managed by this activity. | ||||||
void | startActivity(Intent intent) | |||||
Launch a new activity. | ||||||
void | startActivityForResult(Intent intent, int requestCode) | |||||
Launch an activity for which you would like a result when it finished. | ||||||
void | startActivityFromChild(Activity child, Intent intent, int requestCode) | |||||
This is called when a child activity of this one calls its startActivity(Intent) or startActivityForResult(Intent, int) method. | ||||||
boolean | startActivityIfNeeded(Intent intent, int requestCode) | |||||
A special variation to launch an activity only if a new activity instance is needed to handle the given Intent. | ||||||
void | startManagingCursor(Cursor c) | |||||
This method allows the activity to take care of managing the given Cursor's lifecycle for you based on the activity's lifecycle. | ||||||
boolean | startNextMatchingActivity(Intent intent) | |||||
Special version of starting an activity, for use when you are replacing other activity components. | ||||||
void | startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData, boolean globalSearch) | |||||
This hook is called to launch the search UI. | ||||||
void | stopManagingCursor(Cursor c) | |||||
Given a Cursor that was previously given to startManagingCursor(Cursor), stop the activity's management of that cursor. | ||||||
void | takeKeyEvents(boolean get) | |||||
Request that key events come to this activity. | ||||||
void | unregisterForContextMenu(View view) | |||||
Prevents a context menu to be shown for the given view. |
void | attachBaseContext(Context newBase) | |||||
Set the base context for this ContextWrapper. | ||||||
Object | getSystemService(String name) | |||||
Return the handle to a system-level service by name. | ||||||
Resources.Theme | getTheme() | |||||
Return the Theme object associated with this Context. | ||||||
void | onApplyThemeResource(Resources.Theme theme, int resid, boolean first) | |||||
Called by setTheme(int) and getTheme() to apply a theme resource to the current Theme object. | ||||||
void | setTheme(int resid) | |||||
Set the base theme for this context. |
void | attachBaseContext(Context base) | |||||
Set the base context for this ContextWrapper. | ||||||
boolean | bindService(Intent service, ServiceConnection conn, int flags) | |||||
Connect to an application service, creating it if needed. | ||||||
int | checkCallingOrSelfPermission(String permission) | |||||
Determine whether the calling process of an IPC or you have been granted a particular permission. | ||||||
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. | ||||||
int | checkCallingPermission(String permission) | |||||
Determine whether the calling process of an IPC you are handling has been granted a particular permission. | ||||||
int | checkCallingUriPermission(Uri uri, int modeFlags) | |||||
Determine whether the calling process and user ID has been granted permission to access a specific URI. | ||||||
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. | ||||||
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. | ||||||
int | checkUriPermission(Uri uri, String readPermission, String writePermission, int pid, int uid, int modeFlags) | |||||
Check both a Uri and normal permission. | ||||||
void | clearWallpaper() | |||||
Remove any currently set wallpaper, reverting to the system's default wallpaper. | ||||||
Context | createPackageContext(String packageName, int flags) | |||||
Return a new Context object for the given application name. | ||||||
String[] | databaseList() | |||||
Returns an array of strings naming the private databases associated with this Context's application package. | ||||||
boolean | deleteDatabase(String name) | |||||
Delete an existing private SQLiteDatabase associated with this Context's application package. | ||||||
boolean | deleteFile(String name) | |||||
Delete the given private file associated with this Context's application package. | ||||||
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. | ||||||
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. | ||||||
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. | ||||||
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. | ||||||
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. | ||||||
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. | ||||||
void | enforceUriPermission(Uri uri, String readPermission, String writePermission, int pid, int uid, int modeFlags, String message) | |||||
Enforce both a Uri and normal permission. | ||||||
String[] | fileList() | |||||
Returns an array of strings naming the private files associated with this Context's application package. | ||||||
Context | getApplicationContext() | |||||
Return the context of the single, global Application object of the current process. | ||||||
AssetManager | getAssets() | |||||
Return an AssetManager instance for your application's package. | ||||||
Context | getBaseContext() | |||||
File | getCacheDir() | |||||
Returns the absolute path to the application specific cache directory on the filesystem. | ||||||
ClassLoader | getClassLoader() | |||||
Return a class loader you can use to retrieve classes in this package. | ||||||
ContentResolver | getContentResolver() | |||||
Return a ContentResolver instance for your application's package. | ||||||
File | getDatabasePath(String name) | |||||
Returns the absolute path on the filesystem where a database created with openOrCreateDatabase(String, int, SQLiteDatabase.CursorFactory) is stored. | ||||||
File | getDir(String name, int mode) | |||||
Retrieve, creating if needed, a new directly in which the application can place its own custom data files. | ||||||
File | getFileStreamPath(String name) | |||||
Returns the absolute path on the filesystem where a file created with openFileOutput(String, int) is stored. | ||||||
File | getFilesDir() | |||||
Returns the absolute path to the directory on the filesystem where files created with openFileOutput(String, int) are stored. | ||||||
Looper | getMainLooper() | |||||
Return the Looper for the main thread of the current process. | ||||||
String | getPackageCodePath() | |||||
Return the full path to this context's code and asset files. | ||||||
PackageManager | getPackageManager() | |||||
Return PackageManager instance to find global package information. | ||||||
String | getPackageName() | |||||
Return the name of this application's package. | ||||||
String | getPackageResourcePath() | |||||
Return the full path to this context's resource files. | ||||||
Resources | getResources() | |||||
Return a Resources instance for your application's package. | ||||||
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. | ||||||
Object | getSystemService(String name) | |||||
Return the handle to a system-level service by name. | ||||||
Resources.Theme | getTheme() | |||||
Return the Theme object associated with this Context. | ||||||
Drawable | getWallpaper() | |||||
Like peekWallpaper(), but always returns a valid Drawable. | ||||||
int | getWallpaperDesiredMinimumHeight() | |||||
Returns the desired minimum height for the wallpaper. | ||||||
int | getWallpaperDesiredMinimumWidth() | |||||
Returns the desired minimum width for the wallpaper. | ||||||
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. | ||||||
FileInputStream | openFileInput(String name) | |||||
Open a private file associated with this Context's application package for reading. | ||||||
FileOutputStream | openFileOutput(String name, int mode) | |||||
Open a private file associated with this Context's application package for writing. | ||||||
SQLiteDatabase | openOrCreateDatabase(String name, int mode, SQLiteDatabase.CursorFactory factory) | |||||
Open a new private SQLiteDatabase associated with this Context's application package. | ||||||
Drawable | peekWallpaper() | |||||
Retrieve the current system wallpaper. | ||||||
Intent | registerReceiver(BroadcastReceiver receiver, IntentFilter filter, String broadcastPermission, Handler scheduler) | |||||
Register to receive intent broadcasts, to run in the context of scheduler. | ||||||
Intent | registerReceiver(BroadcastReceiver receiver, IntentFilter filter) | |||||
Register an BroadcastReceiver to be run in the main activity thread. | ||||||
void | removeStickyBroadcast(Intent intent) | |||||
Remove the data previously sent with sendStickyBroadcast(Intent), so that it is as if the sticky broadcast had never happened. | ||||||
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). | ||||||
void | sendBroadcast(Intent intent) | |||||
Broadcast the given intent to all interested BroadcastReceivers. | ||||||
void | sendBroadcast(Intent intent, String receiverPermission) | |||||
Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced. | ||||||
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. | ||||||
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. | ||||||
void | sendStickyBroadcast(Intent intent) | |||||
Perform a sendBroadcast(Intent) that is "sticky," meaning the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of registerReceiver(BroadcastReceiver, IntentFilter). | ||||||
void | setTheme(int resid) | |||||
Set the base theme for this context. | ||||||
void | setWallpaper(InputStream data) | |||||
Change the current system wallpaper to a specific byte stream. | ||||||
void | setWallpaper(Bitmap bitmap) | |||||
Change the current system wallpaper to a bitmap. | ||||||
void | startActivity(Intent intent) | |||||
Launch a new activity. | ||||||
boolean | startInstrumentation(ComponentName className, String profileFile, Bundle arguments) | |||||
Start executing an Instrumentation class. | ||||||
ComponentName | startService(Intent service) | |||||
Request that a given application service be started. | ||||||
boolean | stopService(Intent name) | |||||
Request that a given application service be stopped. | ||||||
void | unbindService(ServiceConnection conn) | |||||
Disconnect from an application service. | ||||||
void | unregisterReceiver(BroadcastReceiver receiver) | |||||
Unregister a previously registered BroadcastReceiver. |
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() | ||||
Remove any currently set wallpaper, reverting to the system's default wallpaper. | ||||||
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 | 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) | ||||
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 directly in which the application can place its own custom data 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 | PackageManager | getPackageManager() | ||||
Return PackageManager instance to find global package information. | ||||||
abstract | String | getPackageName() | ||||
Return the name of this application's 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, 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...). | ||||||
final | String | getString(int resId) | ||||
Return a localized string from the application's package's default string table. | ||||||
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() | ||||
Like peekWallpaper(), but always returns a valid Drawable. | ||||||
abstract | int | getWallpaperDesiredMinimumHeight() | ||||
Returns the desired minimum height for the wallpaper. | ||||||
abstract | int | getWallpaperDesiredMinimumWidth() | ||||
Returns the desired minimum width for the wallpaper. | ||||||
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. | ||||||
final | TypedArray | obtainStyledAttributes(int resid, 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(int[] attrs) | ||||
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. | ||||||
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 | Drawable | peekWallpaper() | ||||
Retrieve the current system wallpaper. | ||||||
abstract | Intent | registerReceiver(BroadcastReceiver receiver, IntentFilter filter, String broadcastPermission, Handler scheduler) | ||||
Register to receive intent broadcasts, to run in the context of scheduler. | ||||||
abstract | Intent | registerReceiver(BroadcastReceiver receiver, IntentFilter filter) | ||||
Register an BroadcastReceiver to be run in the main activity thread. | ||||||
abstract | void | removeStickyBroadcast(Intent intent) | ||||
Remove the data previously sent with sendStickyBroadcast(Intent), so that it is as if the sticky broadcast had never happened. | ||||||
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) | ||||
Broadcast the given intent to all interested BroadcastReceivers. | ||||||
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 | 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 | sendStickyBroadcast(Intent intent) | ||||
Perform a sendBroadcast(Intent) that is "sticky," meaning the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of registerReceiver(BroadcastReceiver, IntentFilter). | ||||||
abstract | void | setTheme(int resid) | ||||
Set the base theme for this context. | ||||||
abstract | void | setWallpaper(InputStream data) | ||||
Change the current system wallpaper to a specific byte stream. | ||||||
abstract | void | setWallpaper(Bitmap bitmap) | ||||
Change the current system wallpaper to a bitmap. | ||||||
abstract | void | startActivity(Intent intent) | ||||
Launch a new activity. | ||||||
abstract | boolean | startInstrumentation(ComponentName className, String profileFile, Bundle arguments) | ||||
Start executing an Instrumentation class. | ||||||
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. | ||||||
abstract | void | unregisterReceiver(BroadcastReceiver receiver) | ||||
Unregister a previously registered BroadcastReceiver. |
Object | clone() | |||||
Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver. | ||||||
boolean | equals(Object o) | |||||
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. | ||||||
void | finalize() | |||||
Called by the virtual machine when there are no longer any (non-weak) references to the receiver. | ||||||
final | Class<? extends Object> | getClass() | ||||
Returns the unique instance of java.lang.Class which represents the class of the receiver. | ||||||
int | hashCode() | |||||
Returns an integer hash code for the receiver. | ||||||
final | void | notify() | ||||
Causes one thread which is wait ing on the receiver to be
made ready to run. |
||||||
final | void | notifyAll() | ||||
Causes all threads which are wait ing on the receiver to
be made ready to run. |
||||||
String | toString() | |||||
Returns a string containing a concise, human-readable description of the receiver. | ||||||
final | void | wait(long time, int frac) | ||||
Causes the thread which sent this message to be made not ready to run
either pending some change in the receiver (as indicated by
notify or notifyAll ) or the expiration of
the timeout. |
||||||
final | void | wait(long time) | ||||
Causes the thread which sent this message to be made not ready to run
either pending some change in the receiver (as indicated by
notify or notifyAll ) or the expiration of
the timeout. |
||||||
final | void | wait() | ||||
Causes the thread which sent this message to be made not ready to run
pending some change in the receiver (as indicated by notify
or notifyAll ). |
void | onConfigurationChanged(Configuration newConfig) | |||||
Called by the system when the device configuration changes while your component is running. | ||||||
void | onLowMemory() | |||||
This is called when the overall system is running low on memory, and would like actively running process to try to tighten their belt. |
boolean | onKeyDown(int keyCode, KeyEvent event) | |||||
Called when a key down event has occurred. | ||||||
boolean | onKeyMultiple(int keyCode, int count, KeyEvent event) | |||||
Called when multiple down/up pairs of the same key have occurred in a row. | ||||||
boolean | onKeyUp(int keyCode, KeyEvent event) | |||||
Called when a key up event has occurred. |
View | onCreateView(String name, Context context, AttributeSet attrs) | |||||
Hook you can supply that is called when inflating from a LayoutInflater. |
void | onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) | |||||
Called when the context menu for this view is being built. |
boolean | dispatchKeyEvent(KeyEvent event) | |||||
Called to process key events. | ||||||
boolean | dispatchTouchEvent(MotionEvent event) | |||||
Called to process touch screen events. | ||||||
boolean | dispatchTrackballEvent(MotionEvent event) | |||||
Called to process trackball events. | ||||||
void | onContentChanged() | |||||
This hook is called whenever the content view of the screen changes (due to a call to setContentView(). | ||||||
boolean | onCreatePanelMenu(int featureId, Menu menu) | |||||
Initialize the contents of the menu for panel 'featureId'. | ||||||
View | onCreatePanelView(int featureId) | |||||
Instantiate the view to display in the panel for 'featureId'. | ||||||
boolean | onMenuItemSelected(int featureId, MenuItem item) | |||||
Called when a panel's menu item has been selected by the user. | ||||||
boolean | onMenuOpened(int featureId, Menu menu) | |||||
Called when a panel's menu is opened by the user. | ||||||
void | onPanelClosed(int featureId, Menu menu) | |||||
Called when a panel is being closed. | ||||||
boolean | onPreparePanel(int featureId, View view, Menu menu) | |||||
Prepare a panel to be displayed. | ||||||
boolean | onSearchRequested() | |||||
Called when the user signals the desire to start a search. | ||||||
void | onWindowAttributesChanged(WindowManager.LayoutParams attrs) | |||||
This is called whenever the current window attributes change. | ||||||
void | onWindowFocusChanged(boolean hasFocus) | |||||
This hook is called whenever the window focus changes. |
You can call finish() from within this function, in which case onDestroy() will be immediately called without any of the rest of the activity lifecycle (onStart(), onResume(), onPause(), etc) executing.
Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.
savedInstanceState | If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied in onSaveInstanceState(Bundle). Note: Otherwise it is null. |
---|
Copyright 2007 Google Inc. | Build 0.9_r1-98467 - 14 Aug 2008 18:56 |