Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Android hardware back button resets app, possible to avoid?

$
0
0

@torger wrote:

I've made a fairly big app using Ionic Framework. When starting the app it takes about 5 seconds for it to show.

If this delay would only happen when the app is started it would be fine. When you press Android hardware home button or the hardware context switch button, the app is just suspended and it's continuing to run where it was when you come back, no delay at all. However if you press the hardware back button (on the home screen) the app is suspended as expected but then when you return to the app, the app is reloaded, seems like it corresponds to pressing "reload" in the browser, and the 5 second delay is there (and view state is lost etc).

This resetting and the long delay that follows is very annoying.

It's well documented how to catch the hardware back button and do things like showing a popup "are you sure you want to exit?", but that's just wrong, that's not how normal apps work. You don't exit apps, you suspend them, and when you return to them it is where it was, no delay. Sure it would be possible to have a state save and state restore, but with a 5 second startup time it's just not acceptable as many users use both back and home for the same thing.

What I would like to happen is that the hardware back button works like the hardware home button, suspending without resetting/reloading.

A workaround could be to catch the back button and trigger a home button, is that possible to do, or is there some other sort of workaround?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>