Welcome!

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

Reply
Developer
Guest
Posts: 146
Registered: ‎11-05-2008
Accepted Solution

how to read existence message in inbox

Hi,

How can i able to invoke particular a existence message of inbox folder.I have used the Invoke class.But always it gives "ObjectGroupReadonly" exception.Please help me.

Thanx

Please use plain text.
Developer
simon_hain
Posts: 15,558
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: how to read existence message in inbox

to retrieve a mail from the default sessions inbox:
Store store = Session.waitForDefaultSession.getStore();
Folder[] folders = store.list(Folder.INBOX);
Folder inbox = folders[0];
Message[] msgs = inbox.getMessages();

for details see BlackBerry Device Applications Integration Guide 4.6.pdf or similar developer guides.
----------------------------------------------------------
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
Please use plain text.
Developer
Guest
Posts: 146
Registered: ‎11-05-2008

Re: how to read existence message in inbox

Thanx for reply.But if I use Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES ,
        new MessageArguments(msgs[0]));

This message will not be opened,instead of it will throw a exception(ObjectChoiceReadOnly exception).

Please help.

Thanx
       

Please use plain text.
Developer
simon_hain
Posts: 15,558
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: how to read existence message in inbox

that is because the mail application is created with a new message.
quote: "the message application will be launched with the data in the Message prepopulated in a compose screen, ready to send"
you can invoke the messageapplication to display the inbox, the saved messages or a search screen. other views are not possible.

if you want to display the detail view of a message it seems you will have to implement it yourself - or rely on the user to click on the message in the message list.
----------------------------------------------------------
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
Please use plain text.
Developer
Guest
Posts: 146
Registered: ‎11-05-2008

Re: how to read existence message in inbox

Thanx for reply.But this same thing I have seen in a third party application.It's the hidden matter.Please answer me.

Thanx

Please use plain text.
Developer
Guest
Posts: 146
Registered: ‎11-05-2008

Re: how to read existence message in inbox

Is there any possibilty(method) to read a message of Inbox message?Actully what I want to do,that open a message on BB's own "message read" screen not to on my screen.How can I accomplish this task.Please help.

 

Please use plain text.