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
jonp4231
Posts: 5
Registered: ‎12-11-2012
My Device: Developer
Accepted Solution

Can we read/write to native contact app?

Is it possible to read/write from the native contact app using the android runtime? The api claims it succeeds, and if I dump the db cursor to a log, it shows the record, but the native contact app does not show the record.

 

If I make a new record using the native contact app and then launch the android app and dump the db again, it does not show the contact I added, which makes me think they are seperate.

 

Is there some way to read/write to the native contact app? The simulator does say it is an Alpha, is this issue something that will work on a real BB 10 device?

Retired
mwhiteman
Posts: 159
Registered: ‎11-21-2008
My Device: BlackBerry 10

Re: Can we read/write to native contact app?

Hello,

 

We currently do not support read/write to the Native contacts database. From android, you can append the Email and Phone number to existiing contacts, but not create new ones.

 

This is something we are looking to support in features releases.

 

Thanks,

 

Matt Whiteman
Product Manager, Android, BlackBerry Java & Simulators
New Contributor
matrixlnmi169
Posts: 2
Registered: ‎12-20-2012
My Device: BlackBerry 10 Alpha Device

Re: Can we read/write to native contact app?

Hi ,

 

We are facing the similar situation , where we wan to access the blackbery 10 contact . Given below is some scenario mention please do favor to share some view/cause .

 

Ours android to Blackberry 10 (using adnroid runtime)ported app failed to access the device contact .

However , when performed the restore of contact from web , that can be acessible and view through ours apps.

Why we are not able to access the device contact ?

It seems that it is device permission issue , beacuse i am not able to view my application name -say xyz at System Settings-Security and Privacy-Application Permission .

 

Is curently BB10 doesn't support the device contact access , if yes , when it will be possible .

 

Thanks

matrix169

Retired
mwhiteman
Posts: 159
Registered: ‎11-21-2008
My Device: BlackBerry 10

Re: Can we read/write to native contact app?

 Thank you for your feedback.

 

You can access the device contacts using the native BlackBerry 10 APIs (You would have to build a WebWorks, Native or Cascades app), but this is not avalible to the Android Runtime currently.

 

Cheers,

 

Matt Whiteman
Product Manager, Android, BlackBerry Java & Simulators
Developer
mbenge
Posts: 21
Registered: ‎03-28-2011
My Device: Style 9670

Re: Can we read/write to native contact app?

Hey Matt,

   Is there a way for an Android app to detect its running in the Android player on BB 10?  That would allow an app to disable any "Save to Contacts" support.

 

Thanks,

Mark

 

Retired
mwhiteman
Posts: 159
Registered: ‎11-21-2008
My Device: BlackBerry 10

Re: Can we read/write to native contact app?

Hello,

 

Absolutely. You can add code to detect what OS you are on. Something like this will return the OS name.

 

java.lang.System.getProperty("os.name")

 

Thanks,

Matt

Matt Whiteman
Product Manager, Android, BlackBerry Java & Simulators
Developer
mbenge
Posts: 21
Registered: ‎03-28-2011
My Device: Style 9670

Re: Can we read/write to native contact app?

Thanks Matt ... Would the string be unique compared to what we would see on an Android device?

Retired
mwhiteman
Posts: 159
Registered: ‎11-21-2008
My Device: BlackBerry 10

Re: Can we read/write to native contact app?

Yes, it will return a name unique to BlackBerry. BlackBerry PlayBook should return "qnx" and I'm not 100% about about BlackBerry 10, but it will definitely be deferent from an Android device.

 

Cheers,

Matt Whiteman
Product Manager, Android, BlackBerry Java & Simulators
Developer
mbenge
Posts: 21
Registered: ‎03-28-2011
My Device: Style 9670

Re: Can we read/write to native contact app?

Matt,
Thanks for the fast responses!