Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Install App Prompt demo to display this sample app #1965

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
Expand All @@ -53,11 +52,11 @@ fun InstallAppPromptDemo2Screen(
getInstallPromptIntent = { watchName ->
viewModel.phoneUiDataLayerHelper.getInstallPromptIntent(
context = context,
appName = context.getString(R.string.install_app_prompt_sample_app_name),
appPackageName = context.getString(R.string.install_app_prompt_sample_app_package_name),
appName = context.getString(R.string.app_name),
appPackageName = context.packageName,
watchName = watchName,
message = context.getString(R.string.install_app_prompt_sample_message),
image = R.drawable.sample_app_wearos_screenshot,
message = context.getString(R.string.install_app_prompt_demo2_prompt_message),
image = R.drawable.watch_app_screenshot,
)
},
onInstallPromptLaunched = viewModel::onInstallPromptLaunched,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions datalayer/sample/phone/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@
<string name="node_status_start_remote_activity_button_label">Start remote activity</string>

<!-- In-app prompt - Install App Demo 1 screen -->
<string name="install_app_prompt_api_call_demo_message">This demo call the Horologist API to show the install app prompt and the invocation of the deeplink to the Playstore by using the Gmail app as an example. The developer has to gather all the information to display on the prompt, such as app name and watch name to use the prompt in their app.</string>
<string name="install_app_prompt_api_call_demo_message">This demo calls the Horologist API to show the install app prompt and the invocation of the deeplink to the Google Play by using the Gmail app as an example. The developer has to gather all the information to display on the prompt, such as app name and watch name to use the prompt in their app.</string>
<string name="install_app_prompt_run_demo_button_label">Run demo</string>

<!-- In-app prompt - Install App Demo 2 screen -->
<string name="install_app_prompt_api_call_demo2_message">This demo calls the API to display the install app prompt. The API will only display the prompt if there is a watch connected and the watch does not have the app installed already.</string>
<string name="install_app_prompt_api_call_demo2_message">This demo calls the Horologist API to show the install app prompt for the watch demo app. The API will only display the prompt if there is a watch connected and the watch does not have the app installed already.\n\nGoogle Play won\'t find this app as it is not published.</string>
<string name="install_app_prompt_run_demo2_button_label">Run demo</string>
<string name="install_app_prompt_demo2_prompt_message">Test the interactions between the phone and the watch with the demo app.</string>
<string name="install_app_prompt_demo2_result_label">Result: %1$s</string>
<string name="install_app_prompt_demo2_no_watches_found_label">No watches without the app installed were found.</string>
<string name="install_app_prompt_demo2_prompt_install_result_label">User tapped install on the prompt.</string>
Expand Down