learningequality / kolibri-installer-android

Android wrapper for Kolibri.
MIT License
26 stars 22 forks source link

Possible to use back button to return to loading HTML page #26

Closed kollivier closed 5 years ago

kollivier commented 5 years ago

In general, having a working back button is a good thing, but we need a way to 'pop' the loading page from the history, so that hitting back from the Kolibri home will switch to another app as it does with other apps.

With PyEverywhere, we have full access to the browser from Python, so I'm pretty sure we can just write some small code that alters the browser's page history to remove the loading page from it. (Or perhaps we can just clear the history once page load completes.)

indirectlylit commented 5 years ago

Just a clarification - according to the Android docs:

The Up button appears in the app bar and is used to navigate within an app based on the hierarchical relationships between screens. ... The Back button appears in the system navigation bar and is used to navigate, in reverse chronological order, through the history of screens the user has recently worked with.

So the 'back' button should emulate a browser back button, and you switch to another app when you've reached the beginning of the browser history.

The beginning of the browser history is possibly but not necessarily the Kolibri home screen.