Open a specific email in the blackberry email app
Asked Answered
I

2

6

I am trying to get a blackberry message by subject and open it in the default email app. I have this so far:

Store store = Session.waitForDefaultSession().getStore();
Folder folder = store.getFolder("Inbox");
Message[] msgs = folder.getMessages();
Message msg = msgs[0];

But how would I open the message once I have a handle on it?

Intercommunion answered 9/5, 2011 at 20:39 Comment(0)
C
2

This isn't supported by the BlackBerry API yet. You would have to write your own custom email viewer.

BlackBerry API only has support for using the email app to write a new message. See more in this thread or this. Best you can do is post your question on the RIM forums so that they see a need for this.

Cumbrous answered 10/5, 2011 at 14:27 Comment(5)
I think its possible according to this article: docs.blackberry.com/en/developers/deliverables/11935/… - for some reason I don't get point number 6?Intercommunion
All that article is telling you is how to retrieve the contents of a message. You have no access to the actual messaging app to display an email there. I presume this is to prevent people from creating "fake" messages and make it seem like it's part of an email. Point#6 just re-iterates what I'm saying - if you want people to be able to read the email, and you want to control which message, you're going to have to write your own viewer. You cannot access the BlackBerry built-in messaging app to display a selected message.Cumbrous
@Cumbrous +1, I just realised what's meant when it says "Open a Message" - it just means the email and not the actual email displayed in the email app. Oh that's annoying. I wonder if the source code for the email app is available?Intercommunion
Arhimed is right - the source code isn't available. You'd have to write your own viewer, which really shouldn't be challenging :)Cumbrous
I guess I'll have to write my own viewer! Thanks Swati.Intercommunion
P
0

This is supported.

Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(message));

message is Message class.

Philibeg answered 23/1, 2013 at 13:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.