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

Android™ Runtime Development

Reply
New Contributor
troedi
Posts: 4
Registered: ‎05-06-2013
My Device: BlackBerry 10 Alpha

Get BBID within Android app

Hi,

I'm trying to port our exsting Android app  to BB10. The app includes a single-sign-on functionality. For this purpose I have to obtain the Blackberry ID which is configured on the device at runtime. I've already tried the Android AccountManager API to figure out the BBID - with no success :smileyhappy:

Can anybody tell me how to get the BBID within an Android app running on BB10? 

Regards

Martin

Contributor
Dritanxha
Posts: 22
Registered: ‎02-26-2013
My Device: Z10

Re: Get BBID within Android app

Depends on the BB10 that you have but I've posted a similar question here: 

http://supportforums.blackberry.com/t5/Android-Runtime-Development/How-to-get-PIN-UUID-of-BB10-Z10-f...

 

 

The code in that thread returns the device serial number (which is comprised of 0's, PIN and extra 2 hex digits)

 

I'm not getting the right stuff on my Q10 so I'm starting off a new thread specifically targetted at the Q10. GL!

New Contributor
troedi
Posts: 4
Registered: ‎05-06-2013
My Device: BlackBerry 10 Alpha

Re: Get BBID within Android app

[ Edited ]

thank you for your answer. but i think we're talking about different things (if not - i'm sorry, it's my first time with blackberry...)

i need to figure out the blackberry-id shown in the picture below. is there a piece of android sourcecode, which returns  me the id?

 

Contributor
Dritanxha
Posts: 22
Registered: ‎02-26-2013
My Device: Z10

Re: Get BBID within Android app

You're right, you're asking for the BBID associated with the user and the device. I thought that it would fall in the same category as BB PIN or Serial since I wouldn't mind using BBID (instead of device serial/IMEI). 


We are limitted from the Android calls: which of the Android API functionality will BB decide to link BBID and which of the Android functionality will BB link to BB PIN and which to BB device serial/IMEI?

 

These questions remain LARGELY unanswered, there is no clear standard defined :smileysad:

BlackBerry Development Advisor
bbenninger
Posts: 130
Registered: ‎04-19-2013
My Device: BlackBerry Z10

Re: Get BBID within Android app

This is currently not exposed through the Android runtime, as you've discovered.

 

As of 10.1 the Android APIs to retreiving device serial / IMEI should be in tact correctly (you may have noticed in 10.0 the API for IMEI actually returned the serial, which was something we did for PB but mistakenly forgot to rectify in 10.0).

New Contributor
troedi
Posts: 4
Registered: ‎05-06-2013
My Device: BlackBerry 10 Alpha

Re: Get BBID within Android app

[ Edited ]

so, in other words - there's no opportunity to get the blackberry-id within an android-app on BB10?

 

I've experimented with the Android's AccountManager... It shows me the following account

[Account {name=blackberry, type=com.rim}]

but when I call accountManager.getUserData with this account, an exception is thrown...

 

06-03 11:32:57.467: E/AndroidRuntime(17403906): Caused by: java.lang.SecurityException: caller uid 10081 is different than the authenticator's uid

 

there must be a way to figure out the BBID... :smileyhappy:

BlackBerry Development Advisor
bbenninger
Posts: 130
Registered: ‎04-19-2013
My Device: BlackBerry Z10

Re: Get BBID within Android app

Sorry, at the moment there isn't.

New Contributor
troedi
Posts: 4
Registered: ‎05-06-2013
My Device: BlackBerry 10 Alpha

Re: Get BBID within Android app

[ Edited ]

is there any opportunity you can suggest? is it possible to implement a native BB10 service to provide de BBID, which I can access within my Android app? 

Whatever workaround you can imagine, please tell me...  the only important thing is to get the BBID without any user input.