In Blackberry OS 6.0 we have a new API which can be used for launching an app from the notification bar. Here is an example:
try {
DemoMessage msg = new DemoMessage();
ApplicationDescriptor daemonDescr = ApplicationDescriptor.currentApplicationDescriptor();
ApplicationDescriptor mainDescr = new ApplicationDescriptor(daemonDescr, "MyAppName", new String[] {});
// Get existing messages from storage and register them in folders
ApplicationFolderIntegrationConfig inboxIntegration = new ApplicationFolderIntegrationConfig(true, true, mainDescr);
ApplicationMessageFolder folder = ApplicationMessageFolderRegistry.getInstance().registerFolder(
APPLICATION_ID, "MyApplictionFolderName", new ReadableListImpl(),inboxIntegration);
folder.fireElementAdded(msg);
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NullPointerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Where DemoMessage
and ReadableListimpl
are classes from Blackberry 6.0's MessageListDemo
sample app.
For reference, see also this related question: Opening application from notification bar in blackberry.