final ApplicationMessageFolderRegistry reg =
ApplicationMessageFolderRegistry.getInstance();
// Some context menu items don't need a GUI (e.g. an item for deleting a
// message) and will be run in the current daemon application.
final ApplicationDescriptor daemonDescr =
ApplicationDescriptor.currentApplicationDescriptor();
// Main application descriptor - causes application to be launched with
// default welcome screen if a user clicks on the "Message List Demo"
// header in the home screen notifications view.
final ApplicationDescriptor mainDescr =
new ApplicationDescriptor(daemonDescr, APPLICATION_NAME,
new String[] {});
// This application descriptor launches this application with a GUI to
// execute listener callbacks, e.g. to display a message.
final ApplicationDescriptor uiCallbackDescr =
new ApplicationDescriptor(daemonDescr, APPLICATION_NAME,
new String[] { "gui" });
// Get existing messages from storage and register them in folders
final ApplicationFolderIntegrationConfig inboxIntegration =
new ApplicationFolderIntegrationConfig(true, true, mainDescr);