Repository navigation
Android: the app's files and storage in its files folder, Back as Escape or exit #1
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,7 @@ import { | |
| } from "./dom/index.ts"; | ||
| import { config } from "./config.ts"; | ||
| import { computedValue, document, fitView, mediaChanged, viewCanvas, windowTarget } from "./browser.ts"; | ||
| import { MOBILE, TV, cssSize, onBeforeFrame, pixelRatio, quit, screenSize } from "./frame.ts"; | ||
| import { ANDROID, MOBILE, TV, cssSize, onBeforeFrame, pixelRatio, quit, screenSize } from "./frame.ts"; | ||
|
|
||
| // ---------------------------------------------------------------- hit testing | ||
|
|
||
|
|
@@ -460,6 +460,9 @@ onBeforeFrame(() => { | |
| } | ||
| checkObservers(document._viewport, pixelRatio()); | ||
| if (TV) { remote(); return; } | ||
| // Android's Back button is Escape, except where Menu would leave an Apple TV app (the native | ||
| // layer then hands Back to the system) | ||
| if (ANDROID) setMenuButtonExits(config().tv.menuExits?.() ?? false); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| // macOS: Bloom's window has no menu bar, so the standard Cmd-Q / Cmd-W close it here | ||
| if (!MOBILE && (isKeyDown(Key.LEFT_SUPER) || isKeyDown(Key.RIGHT_SUPER)) && (isKeyPressed(Key.Q) || isKeyPressed(Key.W))) quit(); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: Bloom-Engine/web
Length of output: 7951
Script executed:
Repository: Bloom-Engine/web
Length of output: 40822
Web query:
Bloom-Engine engine GitHub Android setMenuButtonExits back Escape sourceResult:
Script executed:
Repository: Bloom-Engine/web
Length of output: 33129
Web query:
"Bloom-Engine/engine" 182 android back setMenuButtonExits escapeResult:
Script executed:
Repository: Bloom-Engine/web
Length of output: 673
Script executed:
Repository: Bloom-Engine/web
Length of output: 42679
Script executed:
Repository: Bloom-Engine/web
Length of output: 4156
Script executed:
Repository: Bloom-Engine/web
Length of output: 21591
Script executed:
Repository: Bloom-Engine/web
Length of output: 1634
Web query:
Android Activity default onBackPressed behavior finish activity Android documentation Back buttonResult:
Script executed:
Repository: Bloom-Engine/web
Length of output: 18638
Require Android Back support from the engine and Activity.
With engine v0.4.19 and default Activity Back handling, Back leaves the app instead of sending Escape when
menuExits()is false. Require an engine with Android Back support and ensure the Activity forwards Back before advertising this behavior.