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
New Developer
laurana
Posts: 3
Registered: ‎10-17-2008

Get device email address

Hi All,

 

I want to get the email address linked to the device using an application installed on this. Is it possible?  What API are used for do this?

 

Thanks,

Laura

 

Please use plain text.
Developer
simon_hain
Posts: 15,558
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: Get device email address

the default mail: Session.getDefaultInstance().getServiceConfiguration().getEmailAddress()
if you want more, iterate over the servicebooks.
----------------------------------------------------------
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
Please use plain text.
New Developer
laurana
Posts: 3
Registered: ‎10-17-2008

Re: Get device email address

Ok, thanks!!!

 

Laura

Please use plain text.
Developer
peter_strange
Posts: 19,508
Registered: ‎07-14-2008

Re: Get device email address

[ Edited ]

For questions like this, try the Knowledge Base.

 

Start here:

http://na.blackberry.com/eng/developers/support/

 

Click on the Developer KB and serarch away.  I found this:

How To – Retrieve the default email address for the device
Article Number: DB-00478

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800698/How_To_...

 

When using this code, note that not all BlackBerry devices have email, so the code can give a null pointer exception somewhere - can't remember where.  I'd put a try catch round the whole thing.

Message Edited by peter_strange on 10-17-2008 05:03 PM
Please use plain text.