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
Contributor
hisumit
Posts: 16
Registered: ‎05-04-2010
My Device: RIM Bold9700
My Carrier: Nextel
Accepted Solution

How to get Default Email Address from blackberry device?

Hi All,

 

How can I  get default email address of blackberry device ??

 

Thanks,

Sumit

Please use plain text.
Developer
peter_strange
Posts: 19,602
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to get Default Email Address from blackberry device?

[ Edited ]

Have you tried using the Search to see if anyone else has asked this question before?

 

They have, Search and you should find the answer and some sample code.

Please use plain text.
Contributor
hisumit
Posts: 16
Registered: ‎05-04-2010
My Device: RIM Bold9700
My Carrier: Nextel

Re: How to get Default Email Address from blackberry device?

Thanks peter.

 

following is the post which says abt the same question.

 

http://supportforums.blackberry.com/t5/Java-Development/How-to-retrive-the-configured-mail-id-into-m...

Please use plain text.
Developer
StevenKader
Posts: 638
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: How to get Default Email Address from blackberry device?

You can try this :

 

String defaultEmailAddress = Session.waitForDefaultSession() .getServiceConfiguration().getEmailAddress() ;


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Please use plain text.
Developer
peter_strange
Posts: 19,602
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to get Default Email Address from blackberry device?

OP - does this mean you have solved your own question?  If so, then you can mark this Thread as solved using the Post you have added.

 

Re JaredCo, I would be cautious using waitfor, this will stall the Thread and can cause you grief especially at start up and when you are testing in devices that do not have email set up. 

Please use plain text.
Developer
StevenKader
Posts: 638
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: How to get Default Email Address from blackberry device?

Thanks for the info Peter.  I will keep that in mind.


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Please use plain text.