Hi all,
I have a problem similar with sunil_zen. My app works fine on the simulator and gives Inbox folder but on the device not.
Here is my source code, I would appreciate any help.
Code:
public class MyApp extends Application implements FolderListener, StoreListener{
public MyApp() {
try {
store = Session.waitForDefaultSession().getStore();
store.addStoreListener(this);
inbox = store.findFolder("Inbox");
for(int i=0; i<inbox.length;i++){
inbox[i].addFolderListener(this);
}
} catch (Exception e) {
System.out.println(e.toString());
}
}
.....
public void messagesAdded(FolderEvent folderEvent) {
......
}
}
|