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

Posts: 203
Registered: ‎07-30-2009
My Device: Bold(9780),Curve(8520)
My Carrier: Vodafone

Issue with local notification

Hi there!!!


I'm trying to add notification message at notification bar available from OS 6.0 and I get the below code but it's not Working the message it's just show the icon with count so any buddy have any idea about it please help me to solve out.



ReadableListImpl collection = new ReadableListImpl();
            ApplicationMessageFolderRegistry amfr = ApplicationMessageFolderRegistry
            ApplicationFolderIntegrationConfig app = new ApplicationFolderIntegrationConfig(
                    true, true,
            ApplicationMessageFolder folder = amfr.registerFolder(
                    0x33c7ce29883abe5fL, "My Folder", collection, app);
            ApplicationIcon icon = new ApplicationIcon(
                    EncodedImage.getEncodedImageResource("Indicator.png"), true);
            int status = ApplicationMessage.Status.INCOMING
                    | ApplicationMessage.Status.UNOPENED;

            amfr.registerMessageIcon(0, status, icon);
            folder.setSearchProperties(new ApplicationMessageSearchProperties(
            amfr.setBulkMarkOperationsSupport(0, status, true, false);

            // Register icon for indicator
            ApplicationIndicatorRegistry air = ApplicationIndicatorRegistry
            air.register(icon, false, false);

            // Add a message
            // MyApplicationMessage implements ApplicationMessage
            DemoMessage myMessage = new DemoMessage("me@here.com",
                    "Pizza Toppings", "What would you like on your pizza?",

            // Update indicator
            ApplicationIndicator ai = air.getApplicationIndicator();
            int size = collection.size();
            ai.setVisible(size > 0);


Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Issue with local notification

did you try the message list demo? does it work correcty? if yes, modify it to yur needs until it does no longer work and check why.
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