PlayStoreAvailability

public class PlayStoreAvailability
extends Object

java.lang.Object
   ↳ com.google.android.wearable.playstore.PlayStoreAvailability


This class is deprecated.
Use androidx.wear.utils.WearTypeHelper#isChinaBuild from the Jetpack Wear library, and androidx.wear.phone.interactions.PhoneTypeHelper from the Jetpack Wear Phone Interactions library instead.

Helper class for checking whether the phone paired to a given Wear OS device has the Play Store. This class is only meant to be used on Wearable devices.

Summary

Constants

int PLAY_STORE_ON_PHONE_AVAILABLE

This value means that the Play Store is available on the phone.

int PLAY_STORE_ON_PHONE_ERROR_UNKNOWN

This value means that there was an error in checking for whether the Play Store is available on the phone.

int PLAY_STORE_ON_PHONE_UNAVAILABLE

This value means that the Play Store is not available on the phone.

Public constructors

PlayStoreAvailability()

Public methods

static int getPlayStoreAvailabilityOnPhone(Context context)

Returns whether the Play Store is available on the Phone.

Inherited methods

Constants

PLAY_STORE_ON_PHONE_AVAILABLE

public static final int PLAY_STORE_ON_PHONE_AVAILABLE

This value means that the Play Store is available on the phone.

Constant Value: 1 (0x00000001)

PLAY_STORE_ON_PHONE_ERROR_UNKNOWN

public static final int PLAY_STORE_ON_PHONE_ERROR_UNKNOWN

This value means that there was an error in checking for whether the Play Store is available on the phone.

Constant Value: 0 (0x00000000)

PLAY_STORE_ON_PHONE_UNAVAILABLE

public static final int PLAY_STORE_ON_PHONE_UNAVAILABLE

This value means that the Play Store is not available on the phone.

Constant Value: 2 (0x00000002)

Public constructors

PlayStoreAvailability

public PlayStoreAvailability ()

Public methods

getPlayStoreAvailabilityOnPhone

public static int getPlayStoreAvailabilityOnPhone (Context context)

Returns whether the Play Store is available on the Phone. If PLAY_STORE_ON_PHONE_ERROR_UNKNOWN is returned, the caller should try again later. This method should not be run on the main thread.

Parameters
context Context

Returns
int One of three values: PLAY_STORE_ON_PHONE_AVAILABLE, PLAY_STORE_ON_PHONE_UNAVAILABLE, or PLAY_STORE_ON_PHONE_ERROR_UNKNOWN.