-
public class AndroidComponentAddress.Builder
Fluently builds instances of AndroidComponentAddress.
-
-
Field Summary
Fields Modifier and Type Field Description Intent
bindIntent
UserHandle
targetUser
-
Method Summary
Modifier and Type Method Description AndroidComponentAddress.Builder
setBindIntent(Intent intent)
Sets the binding Intent to one having the "filter matching" fields of 'intent'. AndroidComponentAddress.Builder
setTargetUser(@Nullable() UserHandle targetUser)
Specifies the Android user in which the built Address' bind Intent will be evaluated. AndroidComponentAddress.Builder
setBindIntentFromComponent(ComponentName component)
Sets the binding Intent to one with the specified 'component' and default values forall other fields, for convenience. AndroidComponentAddress
build()
-
-
Method Detail
-
setBindIntent
AndroidComponentAddress.Builder setBindIntent(Intent intent)
Sets the binding Intent to one having the "filter matching" fields of 'intent'.
'intent' must be "explicit", i.e. having either a target component () or package restriction (getPackage).
-
setTargetUser
@ExperimentalApi(value = https://github.com/grpc/grpc-java/issues/10173) AndroidComponentAddress.Builder setTargetUser(@Nullable() UserHandle targetUser)
Specifies the Android user in which the built Address' bind Intent will be evaluated.
Connecting to a server in a different Android user is uncommon and requires the client apphave runtime visibility of @SystemApi's and hold certain @SystemApi permissions.The device must also be running Android SDK version 30 or higher.
See https://developer.android.com/guide/app-compatibility/restrictions-non-sdk-interfacesfor details on which apps can call the underlying @SystemApi's needed to make this typeof connection.
One of the "android.permission.INTERACT_ACROSS_XXX" permissions is required. The exact onedepends on the calling user's relationship to the target user, whether client and server arein the same or different apps, and the version of Android in use. See , the essential underlying Android API, for details.
-
setBindIntentFromComponent
AndroidComponentAddress.Builder setBindIntentFromComponent(ComponentName component)
Sets the binding Intent to one with the specified 'component' and default values forall other fields, for convenience.
-
build
AndroidComponentAddress build()
-
-
-
-