08-15-2012 10:51 AM
Hi,
I saw a lot of examples how to send a PIN message pragmatically.. But my question is how can I retrieve pin conversations.. I’m able only to read emails from the ‘store’ but not PIN messages.
Thank you for any help.
08-15-2012 11:01 AM - edited 08-16-2012 02:58 AM
welcome to the support forums.
edit: see below
08-15-2012 03:39 PM
I don't disagree with Simon too often, but in my experience a PIN message is just a special case of an EMAIL message. It carries a different type attribute of Message.PIN_MESSAGE, instead of Message.EMAIL_MESSAGE
How exactly are you trying to access these messages?
08-15-2012 05:28 PM - edited 08-15-2012 05:36 PM
To get the pin messages you need to attach the listener to the default store on the device. The code I use is:
Session session = Session.getDefaultInstance();
Store store = session.getStore();
store.addFolderListener( yourlistener );
If you want to get the messages already on the device you would use this same method, but you will need to check for the name of the folders under the store. The folders for the actual email account will have the name of the email account but the folders for the PIN messages will have the name "no service book". Here is how I check it:
if( (store.list()[i].getFullName().toLowerCase().index
//this is a PIN message folder
}
08-16-2012 02:58 AM
08-22-2012 11:49 AM - edited 08-22-2012 11:51 AM
Hi,
I was trying your solution and got Folder - 'no service book' but message count is 0, however I have an active BBM conversation.
Any suggestions to get that working?
08-22-2012 12:11 PM
BBM and PIN are two completely different things.
08-22-2012 12:15 PM
Isn't bbm working with pin messages? Isn't it just an application that displays pin messages in a conversation style?
08-22-2012 04:15 PM
No.
08-22-2012 07:55 PM
I will apreciate if you will corect me if I'm wrong and explain how to get PIN message.
Thank you in advance!