DEVELOPERS BLOG

Determining Device Account Email Address in Cordova for BlackBerry 10

Guest post by Shikhir Singh, Senior Enterprise Developer.

cordova_bot

For a WebWorks developer, it’s useful to have access to information that can help identify the user of an app. The Cordova plugin com.blackberry.identity can help you get the UUID and the IMEI numbers of the device. But while this information is handy, it does not give a complete picture of the identity of the user.

A newly available Cordova plugin, com.blackberry.community.deviceemails, will retrieve all email addresses for registered accounts set up on the device, as well as the one email address marked as default. This plugin can be used to identify a user automatically or to auto-populate a user’s email address in a form field. Users of mobile devices are notorious for form field typos, why make your user type more information when you can auto-populate it? This plugin can also automatically serve individualized content for each identified user. Keep in mind, this plugin identifies but does not authenticate a user, so a developer needs to be careful about content that is served. If you aren’t clear on identification vs authentication, here is a good article explaining the difference.

It is important to note that when BlackBerry Balance is activated on the device, this plugin cannot retrieve the account email address from the opposite space. In other words, an app residing in the personal space, using this plugin, cannot pull an email address from the work space, and vice versa. As a result, querying for all the email addresses in the work space will result in returning one work space email address.

Check out the extension on GitHub here.

Have you used this plugin yet? If so, we would love to hear your comments below.

BlackBerry

About BlackBerry

BlackBerry is an enterprise software and services company focused on securing and managing IoT endpoints.