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
New Developer
Posts: 31
Registered: ‎09-20-2013
My Device: Z10
My Carrier: NA
Accepted Solution

Calling application method or third party application from Notification Bar.

Hi all!

I'm wondering if it's possible to start a third party application, or call a certain method in an application from the notification bar if it has an icon shown there?

My app puts an icon there, without a message and I need to click on it to start another app or to call a certain function in my app (which runs in the background).

I've done a lot of searching and seem to get that it cannot be done but no concrete evidence that it can't be done. Would I need to add an inbox and listener and start a third party app that way when a user clicks on a message?

Thanks.

Developer
Posts: 16,750
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Calling application method or third party application from Notification Bar.

you can use
http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/ApplicationManager.html
to launch other applications.
to call your own app i would suggest sending a global event (using the same class)
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
Posts: 31
Registered: ‎09-20-2013
My Device: Z10
My Carrier: NA

Re: Calling application method or third party application from Notification Bar.

Thanks Simon,

 

I had already seen this class and used it to call an app from my application, but couldn't get it to work from the Notifications Bar until last week. I finally got a grasp of how notifications and messages work in blackberry thanks to this other post (http://supportforums.blackberry.com/t5/Java-Development/Blackberry-Notification-Bar-How-to-replace-M... and by reviewing the MessageListDemo app for a third time (as I hardly understood it the first two times). 

 

I then reviewed the link you sent me again and found where to use the app manager code to open a third party app, so thanks again for your advice and pointing me in the right direction.

 

Rob

Highlighted
Developer
Posts: 16,750
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Calling application method or third party application from Notification Bar.

i can feel with you there, the MessageList is a sparely documented and quite complicated thing, i struggled quite some time with it as well.
Don't hesitate to open other threads if you have further questions about it Smiley Happy
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter