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
Posts: 198
Registered: ‎04-03-2009
My Device: Not Specified

Write Memo To VCard

 Hi,

 

I want to write Memo to Vcard can I do that ?

 

 The problem is that the BlackBerryPIM supportedSerialFormats supports only BlackBerryPIM.EVENT_LIST, TODO_LIST

 

and CONTACT_LIST

 

 

String[] dataFormats = pim.supportedSerialFormats(BlackBerryPIM.MEMO_LIST);// thows illegal argument exception

 

If i want to use the following line of code...

 

pim.toSerialFormat(memo, baos, "UTF-8", dataFormats[0]);

 

 

what value should be present for the last argument in case of MEMO_LIST

 

 

 

Thanks....

 

 

 

 

Developer
Posts: 16,986
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Write Memo To VCard

if it is not supported you can not use it.
----------------------------------------------------------
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
Developer
Posts: 198
Registered: ‎04-03-2009
My Device: Not Specified

Re: Write Memo To VCard

So only contacts, events and todo can be written to VCard.... Memo cant be written to VCard.....

 

 

 

Thanks.....

Developer
Posts: 16,986
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Write Memo To VCard

it is difficult to say, maybe a good thing to ask at devsupport.

PIM.supportedSerialFormats states:
valid values include CONTACT_LIST, EVENT_LIST, and TODO_LIST.

But BlackberryPIM features static int MEMO_LIST, at least this indicates that the class should support it.
----------------------------------------------------------
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
Developer
Posts: 198
Registered: ‎04-03-2009
My Device: Not Specified

Re: Write Memo To VCard

Yup that is the thing which is confusing... There is a static field MEMO_LIST In BlackBerryPIM.

 

But the  supportedSerialFormats throws exception for MEMO_LIST.

 

May be Memo are not saved in VCard format....Or they have missed to develop the API for Memo.

 

As VCard for memo is not supported i wont be able to write the memo back to MemoList using fromSerialFormat..... Smiley Sad

 

 

Thanks...

Developer
Posts: 198
Registered: ‎04-03-2009
My Device: Not Specified

Re: Write Memo To VCard

[ Edited ]

BlackBerryMemo also inherits the method toSerialFormat() and fromSerialFormat()...From that point of view

 

supportedSerialFormats must support MEMO_LIST so that Memo can be written to VCard...If it cant be written to VCard then i

 

think its a bug and should be looked upon.....

 

 

 

Thanks...

Message Edited by safycool on 05-27-2009 09:55 AM
Highlighted
Retired
Posts: 76
Registered: ‎07-11-2008
My Device: Z10
My Carrier: SingTel

Re: Write Memo To VCard

PIM.toSerialFormat() does not support serializing BlackBerryMemo objects. If you want to write a memo into a VCard format you will have to implement this yourself.
Sarim
BlackBerry Development Advisor
www.BlackBerryDeveloper.com