PlayStoreAvailability

public class PlayStoreAvailability
extends Object

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


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

From class java.lang.Object

Constants

PLAY_STORE_ON_PHONE_AVAILABLE

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

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

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

PlayStoreAvailability ()

Public methods

getPlayStoreAvailabilityOnPhone

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.