forked from google/horologist
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs for phone ui prompts and some improvements
- Loading branch information
Showing
6 changed files
with
174 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# DataLayer phone UI | ||
|
||
The DataLayer phone UI library provides an implementation for phone prompts UI that can be used to | ||
bring more users to the Wear app. | ||
|
||
## Install app | ||
Use the `InstallAppPrompt` to build the UI of a prompt to ask the user to install the app on their watch. | ||
|
||
The `shouldDisplayPrompt` method allows to check if the prompt should be displayed, based on the following conditions: | ||
|
||
- there is a watch connected | ||
|
||
- the app is not installed | ||
|
||
The `shouldDisplayPrompt` method is relying on the capability defined in the wear.xml of the Wear app, if the Wear app is installed | ||
but hasn't been updated with the capability definition, this method may still return a `AppHelperNodeStatus` | ||
indicating that the Wear app is not installed. | ||
|
||
## ReEngage prompt | ||
Use the `ReEngagePrompt` to build the UI of a prompt to ask the user to install the app on their watch. | ||
The `shouldDisplayPrompt` method allows to check if the prompt should be displayed, based on | ||
the criteria that the app is already installed. | ||
|
||
## SignIn prompt | ||
Use the `SignInPrompt` to build the UI of a prompt to ask the user to finish the sign in on the watch. | ||
The `shouldDisplayPrompt` method allows to check if the prompt should be displayed, if any of the | ||
following conditions for the `UsageStatus` is true: | ||
|
||
- `UsageStatus.UNRECOGNIZED` | ||
- `UsageStatus.USAGE_STATUS_UNSPECIFIED` | ||
- `UsageStatus.USAGE_STATUS_LAUNCHED_ONCE` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# DataLayer sample app | ||
|
||
The goal of this sample is to show how to use the DataLayer helpers both on phone and watch. | ||
|
||
## DataLayer phone sample app | ||
|
||
### In-app prompts | ||
This sample shows how to build in app prompts by using the | ||
[Phone UI library](https://github.com/google/horologist/tree/main/datalayer/phone-ui) and the | ||
[PhoneDataLayerAppHelper](https://github.com/google/horologist/blob/main/datalayer/phone/src/main/java/com/google/android/horologist/datalayer/phone/PhoneDataLayerAppHelper.kt). | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.