get noWindow working as expected in Phonegap?

edited January 2012 in Packaging Apps
I use noWindow to load stuff, manage dashboards and background processing (on webOS) and to load cards on demand.

running the app on Chrome everything works as expected (obviously, banners and dashboards aside), but when packaging the app it seems that when the noWindow loads the first window it deletes the entire noWindow stuff from memory, as if the first url loaded were the first window one.

Anyone has managed how to prevent this behaviour?

Comments

  • PhoneGap on most platforms works with the idea that there's a single window, so loading a new window will cause the original one to go away.

    I think it would be an interesting exercise to modify PhoneGap to support the idea of multiple HTML window contexts, but it's not a trivial engineering work.
  • So we should expect most of noWindow apps to be broken on Phonegap. That's bad, as the app works pretty well on Chrome.
  • Chrome is able to host multiple windows, since it's a full browser. PhoneGap is just a shell around a single WebKit view.
  • I did find that I was able to switch "windows" on demand by calling renderInto(document.body) on the component that would in webOS be the base component of the other window. I didn't thoroughly test this, but it might be worth a look. Just used it to go from a noWindow for background processing to launch a main window.
  • mhhh...

    As you say, maybe something like

    if(!window.PalmSystem) { secondaryWindowKind.renderInto(document.body); } else { enyo.windows.openwindow("secondaryWindow"); }

    could work, but not sure if it's the best approach programming from scratch, or how this could affect performance or visual glitches on the app.

    As you say too, probably it's better to rethink the noWindow part of the app, and load a different app structure depending on if window.PalmSystem exists or not.
  • That does work to start the main app from GVoice, on iOS, at least. I haven't tried this one on Android yet, the performance problems related to flick-scrolling on other platforms need to be addressed somehow, and I just plain don't have time to dig into it nor the knowledge of how that works to be able to change it somehow.

    It also, of course, requires adding the entire app to the originally noWindow part's depends.js.
Sign In or Register to comment.