Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 193
Registered: ‎02-27-2009
My Device: Not Specified

Launching the unlaunchable

I have written a general purpose application launcher to supplement the functionality of the Home screen. In the process, I encountered some apparently insurmountable problems with the ApplicationDescriptor class that implements general purpose application launching functionality. There is also the Invoke API and browser API, but those are far too limited to be useful. With the ApplicationDescriptor class, the frustrating part is that RIM seems to provide exactly what I need, yet cripple it in critical ways.


The main problem is with RIM apps. Digging through the forums, it appears that with OS 4.5 and later you cannot call ApplicationDescriptor.run() and pass arguments to an app written by RIM. If you do, you get a ControlledAccessException no matter how many permissions you are assigned. Many RIM apps need arguments to be passed to start up correctly. This includes built-in apps like Media as well as all IM apps: AIM, Yahoo Messenger, Google Talk, MSN and ICQ. I don't see why these apps must be restricted in the way they are invoked: they provide ordinary app functionality, and only happen to be written by RIM. The unfortunate part is that even with the argument restiction, RIM could simply have made these apps launchable by requiring no arguments for the UI entry point for these apps. The way I see it, as RIM writes more and more consumer apps for the BB, the ApplicationDescriptor.run() API becomes increasingly useless.


My questions:



  • Is there any way to launch these unlaunchable apps that I missed?

  • Is there any hope of getting RIM to ease their unnecessary restrictions on launching conventional RIM apps?

  • Failing that, can I get word to RIM to change the way they start their apps with arguments?

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Launching the unlaunchable

Do ApplicationManager.launch(URL) and ApplicationManager.launchApplication(URL) refuse to launch RIM's own applications too?
Developer
Posts: 193
Registered: ‎02-27-2009
My Device: Not Specified

Re: Launching the unlaunchable

You can launch these RIM apps with either ApplicationDescriptor.run() or ApplicationManager.launch(). The problem is that you cannot launch RIM apps with arguments. And for the RIM apps I am talking about, they won't launch correctly without arguments. Exceptions are rare and fleeting. For example, I found I can run the Media app -- but not the Music app -- without arguments in OS 4.5, but that breaks in OS 4.6. 
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Launching the unlaunchable

May be some of these apps can be invoked via the javax.microedition.content API (e.g., App World can be)...
New Developer
Posts: 24
Registered: ‎07-20-2009
My Device: Not Specified

Re: Launching the unlaunchable

If you're really curious about it find it out Smiley Wink
Using JDE, launch the simulator, then select from menu View->Objects, click Refresh and look for all objects of the type "ApplicationDescriptor"