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

Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait(long arg0, int arg1)
final void wait(long arg0)
final void wait()

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