Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launching Blackberry Apps from the Command Line

I am trying to make use of the fledgecontroller to launch my app from the command line but when I execute the following line, nothing happens, no errors.The 9800 simulator doesn't change from the homescreen to my app. Why is that?

fledgecontroller /session=9800 /execute=LoadCod("C:\\Documents and Settings\\Abs\\workspace2\\bb\\deliverables\\Standard\\6.0.0\\bb.cod")

In addition, is there anyway I can pass a parameter to my app? It will really help with testing.

Thanks all for any help

like image 408
Abs Avatar asked May 15 '11 11:05

Abs


1 Answers

LoadCod will load the application onto the simulator, but will not actually start the app. In order to do that, you'll still have to manually start it by passing the keyboard and trackball or touch events to click the app icon (using fledgecontroller again). Alternatively, you could try setting the app to load on startup (it's a checkbox in the app descriptor file); but whether that will work will depend on what your application is doing.

The way I do it is to set up the simulator session beforehand by hiding all of the other applications/icons on the home folder. Then when the cod is loaded it will be the only app, so you can just send a click event to start it. But if you want to be more thorough you'll also have to send trackball or keyboard events to select the app.

The only way to pass a parameter to the app is to set the parameter value in the app descriptor file (which gets included at compile time). If you need some parameter to specify that it should be a testing instance, you could compile two versions - one for production that does not have the param set, and one for testing that does. Then you would just load the testing version via fledgecontroller.

If you aren't seeing the application getting loaded onto the simulator at all, you can also try replacing your \\ symbols with / symbols (I think fledgecontroller deals with forward slashes usually and internally; I'm not sure why since its an explicitly windows program, but there you have it...)

like image 132
Laepdjek Avatar answered Sep 21 '22 22:09

Laepdjek