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

Web and WebWorks Development

Reply
Developer
darkberry
Posts: 178
Registered: ‎11-19-2008
My Device: Not Specified

how to retrieve the default email address

¿Is there a way to retrieve the device default email address?

Developer
darkberry
Posts: 178
Registered: ‎11-19-2008
My Device: Not Specified

Re: how to retrieve the default email address

I've been reading the API docs and so far it seems possible to get the mail address of every mail account in the device like this:

 

var services = blackberry.identity.getServiceList();
for (var i = 0; i < services.length; i++) {
	if (services[i].type == blackberry.identity.Service.TYPE_EMAIL) {
		alert("Mail Address: " + services[i].emailAddress);
	}
}

 However identity.getServiceList is only supported in BB5-7 and Ripple. Is there a way of doing the same in BB10? And in case of BB7, how could i know which one is the BlackBerry Mail account?