Package 

Class AndroidComponentAddress.Builder

    • Method Detail

      • 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.