-
Notifications
You must be signed in to change notification settings - Fork 0
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
Have DefaultDialog automatically launch Play Store for the user (#14) #22
Conversation
…reTestUpdatesSupported) * Now responsible for indicating app version, as well as if the build is a development build or a testers build * Allows more control for app to decide how these are determined
…ore if Update is clicked
# Conflicts: # app/src/main/java/com/steamclock/versioncheckkotlinsample/App.kt
|
||
// Add the following lines if you want a default alert dialog to handle the displayStates | ||
// and allow the user to jump out to the Play Store to get updates. | ||
val upgradeDialog = DefaultUpgradeDialog(versionChecker.displayStateFlow, packageName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now using same comments and setup in App and Readme for UpgradeDialog
} | ||
|
||
if (canDismiss) { | ||
setPositiveButton("OK") { _, _ -> | ||
setNegativeButton("Close") { _, _ -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed button wording to imply that action would close dialog
getButton(AlertDialog.BUTTON_NEUTRAL)?.setOnClickListener { | ||
// todo Proxy out to Play Store. | ||
getButton(AlertDialog.BUTTON_POSITIVE)?.setOnClickListener { | ||
launchPlayStorePage() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set BUTTON_POSITIVE instead, since it is the affirmative action
Related Issue: #14
Summary of Problem:
Update button current does nothing on default dialog handler; would be nice to have it automatically open the Play Store page for the given application when clicked.
Proposed Solution:
DefaultUpgradeDialog
takes packageName and will now attempt to launch the Play Store for that packageTesting Steps:
Launch the sample app and click on the Update button; the Play Store app should launch. Because there is no listing for the sample app this will come up empty, but I tested this out by manually setting the packageName to be one of our public apps and the store page did load.