LauncherApps.ResolveActivity(Intent, UserHandle) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the activity info for a given intent and user handle, if it resolves.
[Android.Runtime.Register("resolveActivity", "(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/pm/LauncherActivityInfo;", "GetResolveActivity_Landroid_content_Intent_Landroid_os_UserHandle_Handler")]
public virtual Android.Content.PM.LauncherActivityInfo? ResolveActivity (Android.Content.Intent? intent, Android.OS.UserHandle? user);
[<Android.Runtime.Register("resolveActivity", "(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/pm/LauncherActivityInfo;", "GetResolveActivity_Landroid_content_Intent_Landroid_os_UserHandle_Handler")>]
abstract member ResolveActivity : Android.Content.Intent * Android.OS.UserHandle -> Android.Content.PM.LauncherActivityInfo
override this.ResolveActivity : Android.Content.Intent * Android.OS.UserHandle -> Android.Content.PM.LauncherActivityInfo
Parameters
- intent
- Intent
The intent to find a match for.
- user
- UserHandle
The profile to look in for a match.
Returns
An activity info object if there is a match.
- Attributes
Remarks
Returns the activity info for a given intent and user handle, if it resolves. Otherwise it returns null.
If the user in question is a hidden profile UserManager.USER_TYPE_PROFILE_PRIVATE
, caller should have either:
<ul> <li>the privileged android.Manifest.permission.ACCESS_HIDDEN_PROFILES_FULL
permission</li> <li>the normal android.Manifest.permission.ACCESS_HIDDEN_PROFILES
permission and the android.app.role.RoleManager.ROLE_HOME
role. </li> </ul>
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.