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?

jzd
  • 23,019
  • 7
  • 51
  • 76
Abs
  • 51,038
  • 92
  • 260
  • 394

2 Answers2

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.

Swati
  • 40,962
  • 4
  • 35
  • 53
  • I think its possible according to this article: http://docs.blackberry.com/en/developers/deliverables/11935/Open_a_msg_565442_11.jsp - for some reason I don't get point number 6? – Abs May 12 '11 at 19:53
  • 1
    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. – Swati May 12 '11 at 20:11
  • @Swati +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? – Abs May 12 '11 at 20:37
  • Arhimed is right - the source code isn't available. You'd have to write your own viewer, which really shouldn't be challenging :) – Swati May 13 '11 at 15:23
  • I guess I'll have to write my own viewer! Thanks Swati. – Abs May 15 '11 at 15:02
0

This is supported.

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

message is Message class.

Alfabravo
  • 7,232
  • 6
  • 43
  • 77
user1983864
  • 7
  • 1
  • 8