ClientInfo.Companion

public static class ClientInfo.Companion


Direct use of ClientInfo.Companion is not supported.

Summary

Public methods

static final ClientInfo
fromAltPackageName(
    @NonNull Context context,
    @NonNull String originatingPackage,
    @NonNull String altPackage
)

Builds a ClientInfo for an alternative package in a cross app experience.

static final ClientInfo
fromPackageName(@NonNull Context context, String packageName)

Builds a ClientInfo for a specific package name.

static final ClientInfo
fromPackageName(
    @NonNull Context context,
    String packageName,
    String onBehalfOf
)

Builds a ClientInfo for a specific package name.

Public methods

fromAltPackageName

public static final ClientInfo fromAltPackageName(
    @NonNull Context context,
    @NonNull String originatingPackage,
    @NonNull String altPackage
)

Builds a ClientInfo for an alternative package in a cross app experience.

Parameters
@NonNull String originatingPackage

name of the package that initialates the experience.

@NonNull String altPackage

name of the alternative package on the other side of cross app channel.

fromPackageName

public static final ClientInfo fromPackageName(@NonNull Context context, String packageName)

Builds a ClientInfo for a specific package name. Within an SDK, the packageName is the packageName of the application using the SDK. Within Google Play services, the packageName is the callingPackage and not the package name of Google Play services.

fromPackageName

public static final ClientInfo fromPackageName(
    @NonNull Context context,
    String packageName,
    String onBehalfOf
)

Builds a ClientInfo for a specific package name. Within an SDK, the packageName is the packageName of the application using the SDK. Within Google Play services, the packageName is the callingPackage and not the package name of Google Play services. The extra parameter onBehalfOf is used to indicate that a package is performing work on behalf of another package.