2011-07-12 155 views
1

我試圖用這個例子,黑莓消息

//Register the ApplicationMessageFolder 
//ReadableListImpl source is available in the messagelistdemo. 
ApplicationMessageFolder folder =  ApplicationMessageFolderRegistry.getInstance().registerFolder(
    0x33c7ce29883abe5fL, "Test Folder", new ReadableListImpl()); 

//DemoMessage source is available in the messagelistdemo. 
DemoMessage msg = new DemoMessage("[email protected]", "Pizza Toppings", 
    "What would you like on your pizza?", System.currentTimeMillis()); 
folder.fireElementAdded(msg); 

//Display the application indicator icon. 
ApplicationIndicatorRegistry reg = ApplicationIndicatorRegistry.getInstance();  

EncodedImage image = EncodedImage.getEncodedImageResource("Indicator.png"); 

ApplicationIcon icon = new ApplicationIcon(image); 

ApplicationIndicator indicator = reg.register(icon, false, true); 
indicator.setIcon(icon); 
indicator.setVisible(true); 

我能看到indicatoe圖標,但不顯示的消息。

有人能告訴我最新錯了嗎?

BR, Suppi

回答

0

This question似乎相應和對您的問題。但是,閱讀您引用的tuturial(here),似乎您沒有在主屏幕上看到該消息,但是如果您輸入消息應用程序,是否可以確認它在那裏?

+0

不幸的是,我在消息應用程序中看不到該消息 – Suppi

+0

調試時,您沒有看到任何異常?你能否確認你所調用的DemoMessage方法是全部執行還是提前失敗,但隱藏一個異常? – Grambot

+0

我調試了應用程序,我沒有得到任何異常。這在早些時候工作。重新加載操作系統後,它停止工作。 – Suppi