Launching Blackberry apps from the command line

I try to use fledgecontroller to run my application from the command line, but when I execute the next line, nothing happens, no errors. The 9800 simulator does not change from the main screen to my application. Why is this?

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

Also, is there a way to pass a parameter to my application? This will really help when testing.

Thank you all for your help.

+6
source share
2 answers

LoadCod will load the application onto the simulator, but will not actually launch the application. To do this, you still have to manually start it, passing the keyboard, trackball or touch events to click the application icon (again using the fledgecontroller). In addition, you can try to configure the loading of the application at startup (this is a flag in the application descriptor file); but whether this will work will depend on what your application does.

As I do this, I need to pre-configure the simulator session by hiding all other applications / icons in the home folder. Then, when the cod loads, it will be the only application, so you can just send a click event to fire it. But if you want to be more thorough, you will also have to send a trackball or keyboard events to select an application.

The only way to pass the parameter to the application is to set the parameter value in the application descriptor file (which is included at compile time). If you need some parameter to indicate that it should be an instance for testing, you can compile two versions - one for production, which does not have a set of parameters, and the other for testing. Then you just download the test version via fledgecontroller.

If you haven’t downloaded the application to the simulator at all, you can also try replacing the \\ characters with / characters (I think the fledgecontroller deals with the slash, as a rule, inside as well, I’m not sure, because its obviously a Windows program, but there you have it ...)

+1
source

I use this method almost daily on the 8300 simulator. An important parameter (which you can get by analyzing the debugging settings in Eclipse) is /app-param=launch=MyBBAppName .

I think that the later simulators you are asking for do not allow you to specify the application to load at startup.

If you need to do this, one way would be to create the application as a “download at startup” application, and then when the simulator loads, your application will start. I am using this workaround for later simulators at the moment.

0
source

Source: https://habr.com/ru/post/888149/


All Articles