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

Make use of hardware back button #247

Open
birbilis opened this issue Jul 9, 2022 · 3 comments
Open

Make use of hardware back button #247

birbilis opened this issue Jul 9, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request platform:Android Android specific issue

Comments

@birbilis
Copy link
Contributor

birbilis commented Jul 9, 2022

Version: 0.6.0

Pressing hardware back button suspends the application and goes to OS Home screen on mobiles like Android

Could capture the hardware back button and show some confirmation prompt or even cancel the default back action or make it close the app after confirmation
https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Creating_an_Android_App#Using_the_Android_Device.27s_Back_Button

not sure if such a prompt would be too intrusive for users who want to go back and forth from the app to other apps, but might help younger children not get lost, esp. if the back button action is canceled (though it might annoy more advanced users)

alternatively the back could ask what user wants to do, like Exit, Suspend or Cancel (via some popup with icons ideally)

@birbilis birbilis added enhancement New feature or request platform:Android Android specific issue labels Jul 9, 2022
@birbilis birbilis self-assigned this Jul 9, 2022
@birbilis birbilis added this to To Do in READ-COM App via automation Jul 9, 2022
@birbilis
Copy link
Contributor Author

birbilis commented Jul 9, 2022

Could also set the hardware back button to do PreviousStoryItem till HomeStoryItem is reached.
If ActiveStoryItem.Home = true it would prompt the user if they want to exit back to the Home screen
and if already at the Home screen could ask if they want to exit the application (and terminate it in that case, not just suspend it)

@birbilis
Copy link
Contributor Author

birbilis commented Jul 9, 2022

Another idea is to implement document/story history (for those documents where a source url or path [updated upon saving] is available and accessible) and have back load previous document/story, till there's no more such, in which case it would go to default embedded document and upon back from which (but checking if this is indeed the top item in the history with no more to go back to) would prompt to terminate the app

loading the default story directly by the user could just be ignored in the history (should always just keep a single entry for that at the top of the history, placed before the loaded from saved state content). Not sure if that would confuse though.

@birbilis birbilis changed the title Pressing hardware back button suspends the application going to OS home screen Make use of hardware back button Jul 17, 2022
@birbilis
Copy link
Contributor Author

note that back's behaviour on AndroidTV shouldn't show an exit warning in general, unless destructive action / data loss might occur by the exiting
"Ensure that the back button isn't gated by confirmation screens or part of an infinite loop." https://developer.android.com/training/tv/start/navigation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request platform:Android Android specific issue
Projects
Development

No branches or pull requests

1 participant