1

I am basically executing the following luna-send command and trying to get those parameters from applicationManager:

luna-send -n 1 palm://com.palm.power/timeout/set '{"wakeup":true, "key":"myKey",
"uri":"palm://com.palm.applicationManager/launch","params":{"id":"com.my.app", 
"params":{"test":true,"test1:true}},"in":"00:00:15"}'

After executing this command, my app gets launched by applicationManager, but I don't know how to get those params in my app. I am using enyo 2.0. I was trying to use onWindowsParamsChange handler, but ApplicationEvents is deprecated for 2.0. Can anyone help me with this?

Thanks

oser
  • 37
  • 4

1 Answers1

2

Under Enyo 1.0 it was enyo.windowParams. Under Enyo 2.0 I believe this functionality is gone. These parameters may be available through Cordova, but I'm not positive right now as I don't have the source handy. In any case, this was loaded from PalmSystem.launchParams so you should be able to access that.

If you're handling relaunch then you'll have a little more work to do. I think you'll need to define a Mojo.relaunch on the window object to detect when the launch parameters change.

Pre101
  • 2,370
  • 16
  • 23
  • Thanks! PalmSystem.launchParams works for me :) I have one more question though regarding app being relaunched. Could you give me some code snippet for detecting the app relaunching from the card view? – oser Oct 17 '13 at 08:24
  • Do you mean a relaunch or just coming out of card view? – Pre101 Oct 17 '13 at 20:17
  • Isn't relaunching the app the same as getting out of card view and going back to the full screen mode? – oser Oct 19 '13 at 12:40
  • 1
    Not at all. The events for carding are Activated and Deactivated. Check Enyo 1.0 source: source/palm/system/windows/events.js – Pre101 Oct 19 '13 at 16:00