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

fix(android): prevent showing base activity #13889

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Jul 28, 2023

fixes #13791

var win1 = Ti.UI.createWindow({
	backgroundColor: "green"
})
win1.addEventListener("click", function() {
	var win2 = Ti.UI.createWindow({
		backgroundColor: "red"
	})
	win2.open();
})
win1.open();

Steps to reproduce

  • open the app (green window)
  • click to open the second window (red)
  • close the red window and close the green window right away
  • you will see the root activity

more infos in the ticket

needs more testing but my idea is that there shouldn't be one item left as this is the base activity (the splashscreen). Perhaps there is even a better way to check which activity it is now checking for the root activity class name.

When I log the size of the activityStack it will normally go from 2 to 0 when you close the window normally. If the window has a transition (default) and you close it quickly it will go from 2 to 1 and show the app icon (see video in issue).

Updates:

  • Improved the check a bit after testing it with an app that was using NFC to open a second window at start.
  • Fixed some liveview issue. To test it: start the app with liveview, open the second window, save the file to trigger a liveview soft restart

@m1ga m1ga marked this pull request as draft January 28, 2024 19:07
@m1ga m1ga marked this pull request as ready for review May 23, 2024 10:45
@m1ga m1ga added the bug label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android: closing two windows quickly won't close app
1 participant