Intent extra data key: Use this key with content.Intent.getStringExtra() to obtain the query string from Intent.ACTION_SEARCH. html
Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll". java
name | The name of the extra data, with package prefix. |
---|---|
value | The CharSequence data value. |
Return the Activity component that should be used to handle this intent. The appropriate component is determined based on the information in the intent, evaluated as follows: android
If getComponent() returns an explicit class, that is returned without any further consideration. app
The activity must handle the CATEGORY_DEFAULT Intent category to be considered. ide
If getAction() is non-NULL, the activity must handle this action. 佈局
If resolveType(ContentResolver) returns non-NULL, the activity must handle this type. ui
If addCategory(String) has added any categories, the activity must handle ALL of the categories specified. this
If getPackage() is non-NULL, only activity components in that application package will be considered. lua
If there are no activities that satisfy all of these conditions, a null string is returned. spa
If multiple activities are found to satisfy the intent, the one with the highest priority will be used. If there are multiple activities with the same priority, the system will either pick the best activity based on user preference, or resolve to a system class that will allow the user to pick an activity and forward from there.
This method is implemented simply by calling resolveActivity(Intent, int) with the "defaultOnly" parameter true.
This API is called for you as part of starting an activity from an intent. You do not normally need to call it yourself.
pm | The package manager with which to resolve the Intent. |
---|
Return a resource identifier for the given resource name. A fully qualified resource name is of the form "package:type/entry". The first two components (package and type) are optional if defType and defPackage, respectively, are specified here.
Note: use of this function is discouraged. It is much more efficient to retrieve resources by identifier than by name.
name | The name of the desired resource. |
---|---|
defType | Optional default resource type to find, if "type/" is not included in the name. Can be null to require an explicit type. |
defPackage | Optional default package to find, if "package:" is not included in the name. Can be null to require an explicit package. |