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

ApplicationEvents not Firing #13

Open
codepoet80 opened this issue Feb 16, 2022 · 4 comments
Open

ApplicationEvents not Firing #13

codepoet80 opened this issue Feb 16, 2022 · 4 comments

Comments

@codepoet80
Copy link

codepoet80 commented Feb 16, 2022

Describe the bug
Enyo supports ApplicationEvents that bubble domEvents to apps. These are used for detecting screen rotation and application relaunches. These ApplicationEvents are not be fired in LuneOS (of if they're fired, apps aren't receiving them), which significantly impact the functionality of some apps.

To Reproduce
Steps to reproduce the behavior:

  1. Install Webb Telescope Tracker from App Museum II
  2. Launch and observe a banner notification saying "detecting rotation"
  3. Rotate your physical device, or press F8 to simulate rotation in the emulator
  4. Note that no new banner notification appears
  5. Try the same steps on a webOS device or emulator, note that a banner notification appears any time the device is rotated

Expected behavior
As documented here, application events should be raised to any app with an ApplicationEvents kind.
http://sdk.webosarchive.com/docs/docs.html#dev-guide/enyo/application-events.html

Additionally, it should be noted that the originating DOM event (window.onresize) is not raised to the app either. The problem may be at the webkit level?

Smartphone (please complete the following information):

  • Device: Tenderloin, Hammerhead, Emulator
  • OS: LuneOS
  • Version: built 202200215

Additional Context
ApplicationEvents are implemented in dom/ApplicationEvents.js
https://sdk.webosarchive.com/api/index.html#dom/ApplicationEvents.js

@Herrie82
Copy link
Collaborator

I doubt that ApplicationEvents completely don't work, since they're used in quite some apps such as Just Type, email etc as per https://github.com/search?p=1&q=org%3Aopenwebos+ApplicationEvents&type=Code.

It could be that some of them (such as luna-systemui) aren't working. Then again I could be wrong of course.

@codepoet80
Copy link
Author

codepoet80 commented Feb 16, 2022

I built a tester app so we can see the missing application events.
You can download it here: stacks.webosarchive.org/luneos/com.jonandnic.enyotester_1.0.0_all.ipk

In a quick test, the launch and menu events are firing in LuneOS, but not the relaunch and screen events.
The screen grabs attached show the same sequence of actions on a tenderloin running webOS and LuneOS...

  • Start the app landscape
  • Rotate the device portrait
  • Rotate the device landscape
  • Open the app menu
  • Close the app menu
  • Open the app menu and choose Relaunch

Note LuneOS is missing actual rotation events (but firing a spurious rotation event at startup) and the relaunch events.
All enyo.ApplicationEvents have been wired up, so if you can figure out a way to invoke them, they can be tested with this app.

webOS-AppEvents

LuneOS-AppEvents

@Herrie82
Copy link
Collaborator

Herrie82 commented Dec 8, 2023

I'm really not sure where these are handled, I don't see any hooks in Open webOS code for these events in any of the browser related stuff, so it seems it's fully Enyo Framework somehow.

@codepoet80
Copy link
Author

Rotation events seem to be working in newer builds. ApplicationRelaunch is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants