Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Android: Window.exitOnBack closes the current activity instead of the main #49

Open
Jei opened this issue Jul 18, 2018 · 0 comments
Open

Comments

@Jei
Copy link
Contributor

Jei commented Jul 18, 2018

When Window.exitOnBack is set to true, the back button is supposed to close the main activity of the Titanium app. What we're doing instead is:

			$this.addEventListener('androidback', function() {
				$this.exitOnClose = true; // Set exitOnClose to true, since every window is an activity
				Ti.Android.currentActivity.finish();
			});

which means that the main activity of the app still exists even after pressing the back button.
One side effect is that the previous intent data is retained if we open the app again from the opened apps menu, which means that, if we start the app with a url schema, it will be read again.

@Jei Jei changed the title Android: Window.exitOnBack does not close the app fully Android: Window.exitOnBack closes the current activity instead of the main Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant