以下のコードを使用して通知メッセージを表示しています。
ReadableListImpl mylist= new ReadableListImpl();
ApplicationMessageFolder folder = null;
ApplicationDescriptor daemonDescr = ApplicationDescriptor.currentApplicationDescriptor();
ApplicationDescriptor mainDescr = new ApplicationDescriptor(daemonDescr, "Velocity", new String[] {});
ApplicationFolderIntegrationConfig config = new ApplicationFolderIntegrationConfig(true, true, mainDescr);
if(ApplicationMessageFolderRegistry.getInstance().getApplicationFolder(0x33c7ce29883abe5fL)==null){
folder = ApplicationMessageFolderRegistry.getInstance().registerFolder(0x33c7ce29883abe5fL, "Test Folder", new ReadableListImpl(),config );
}else {
folder = ApplicationMessageFolderRegistry.getInstance().getApplicationFolder(0x33c7ce29883abe5fL);
}
DemoMessage msg = new DemoMessage("name", "Subject","Text body",
System.currentTimeMillis());
mylist.addMessage(msg);
folder.fireElementAdded(msg,true);
これは正常に機能しますが、新しい通知フィールドを展開して新しい通知を表示すると、Messages と Velocity の 2 つのフィールドの下に同じメッセージが表示されます。
このメッセージ フィールドをホーム画面に表示する必要はありませんが、それらのメッセージをメッセージ フォルダーに追加する必要があります。
ここで最初のブール変数を false に変更すると、メッセージ フィールドは消えますが、メッセージはメッセージ フォルダーにも追加されません。
ApplicationFolderIntegrationConfig(false, true, mainDescr);
どうすればそれができるか教えてください?? (必要に応じて、2 つの追加クラス demomessage と readblelistimpl があります。これらのコードも投稿できます) ありがとうございます。