Stay organized with collections
Save and categorize content based on your preferences.
PlayStoreAvailability
public
class
PlayStoreAvailability
extends Object
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
Inherited methods |
From class
java.lang.Object
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 |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# PlayStoreAvailability\n\nSummary: [Constants](#constants) \\| [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nPlayStoreAvailability\n=====================\n\n\n`\npublic\n\n\nclass\nPlayStoreAvailability\n`\n\n\n`\n\nextends `[Object](http://developer.android.com/reference/java/lang/Object.html)`\n\n\n`\n\n`\n\n\n`\n\n|---|-------------------------------------------------------------|\n| [java.lang.Object](http://developer.android.com/reference/java/lang/Object.html) ||\n| ↳ | com.google.android.wearable.playstore.PlayStoreAvailability |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This class is deprecated.** \n\nUse `androidx.wear.utils.WearTypeHelper#isChinaBuild` from the [Jetpack Wear](../../../../../../jetpack/androidx/releases/wear) library, and `androidx.wear.phone.interactions.PhoneTypeHelper` from the [Jetpack Wear Phone Interactions](../../../../../../jetpack/androidx/releases/wear) library\ninstead.\n\nHelper class for checking whether the phone paired to a given Wear OS device has the Play Store.\nThis class is only meant to be used on Wearable devices.\n\nSummary\n-------\n\n| ### Constants ||\n|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | [PLAY_STORE_ON_PHONE_AVAILABLE](../../../../../../reference/com/google/android/wearable/playstore/PlayStoreAvailability.html#PLAY_STORE_ON_PHONE_AVAILABLE) This value means that the Play Store is available on the phone. |\n| `int` | [PLAY_STORE_ON_PHONE_ERROR_UNKNOWN](../../../../../../reference/com/google/android/wearable/playstore/PlayStoreAvailability.html#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. |\n| `int` | [PLAY_STORE_ON_PHONE_UNAVAILABLE](../../../../../../reference/com/google/android/wearable/playstore/PlayStoreAvailability.html#PLAY_STORE_ON_PHONE_UNAVAILABLE) This value means that the Play Store is not available on the phone. |\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[PlayStoreAvailability](../../../../../../reference/com/google/android/wearable/playstore/PlayStoreAvailability.html#PlayStoreAvailability())`() ` |\n\n| ### Public methods ||\n|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static int` | ` `[getPlayStoreAvailabilityOnPhone](../../../../../../reference/com/google/android/wearable/playstore/PlayStoreAvailability.html#getPlayStoreAvailabilityOnPhone(android.content.Context))`(`[Context](http://developer.android.com/reference/android/content/Context.html)` context) ` Returns whether the Play Store is available on the Phone. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](http://developer.android.com/reference/java/lang/Object.html)` ` |------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| | ` `[Object](http://developer.android.com/reference/java/lang/Object.html) | ` clone() ` | | ` boolean` | ` equals(`[Object](http://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void` | ` finalize() ` | | ` final `[Class](http://developer.android.com/reference/java/lang/Class.html)`\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` `[String](http://developer.android.com/reference/java/lang/String.html) | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nConstants\n---------\n\n### PLAY_STORE_ON_PHONE_AVAILABLE\n\n```\npublic static final int PLAY_STORE_ON_PHONE_AVAILABLE\n```\n\nThis value means that the Play Store is available on the phone.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n1\n(0x00000001)\n\n\n### PLAY_STORE_ON_PHONE_ERROR_UNKNOWN\n\n```\npublic static final int PLAY_STORE_ON_PHONE_ERROR_UNKNOWN\n```\n\nThis value means that there was an error in checking for whether the Play Store is available on\nthe phone.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n0\n(0x00000000)\n\n\n### PLAY_STORE_ON_PHONE_UNAVAILABLE\n\n```\npublic static final int PLAY_STORE_ON_PHONE_UNAVAILABLE\n```\n\nThis value means that the Play Store is not available on the phone.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n2\n(0x00000002)\n\n\nPublic constructors\n-------------------\n\n### PlayStoreAvailability\n\n```\npublic PlayStoreAvailability ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### getPlayStoreAvailabilityOnPhone\n\n```\npublic static int getPlayStoreAvailabilityOnPhone (Context context)\n```\n\nReturns whether the Play Store is available on the Phone. If [PLAY_STORE_ON_PHONE_ERROR_UNKNOWN](../../../../../../reference/com/google/android/wearable/playstore/PlayStoreAvailability.html#PLAY_STORE_ON_PHONE_ERROR_UNKNOWN) is returned, the caller should try again later. This method\nshould not be run on the main thread.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|------------------|\n| `context` | `Context` \u003cbr /\u003e |\n\n| Returns ||\n|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | One of three values: [PLAY_STORE_ON_PHONE_AVAILABLE](../../../../../../reference/com/google/android/wearable/playstore/PlayStoreAvailability.html#PLAY_STORE_ON_PHONE_AVAILABLE), [PLAY_STORE_ON_PHONE_UNAVAILABLE](../../../../../../reference/com/google/android/wearable/playstore/PlayStoreAvailability.html#PLAY_STORE_ON_PHONE_UNAVAILABLE), or [PLAY_STORE_ON_PHONE_ERROR_UNKNOWN](../../../../../../reference/com/google/android/wearable/playstore/PlayStoreAvailability.html#PLAY_STORE_ON_PHONE_ERROR_UNKNOWN). \u003cbr /\u003e |"]]