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™ Development

Reply
New Contributor
Posts: 7
Registered: ‎02-23-2013
My Device: BB10 Dev Alpha B
My Carrier: Idea
Accepted Solution

Not able to read contacts from BB10 Dev Alpha (Android ported app)

Hi Friends,

 

I ported my Android app which exports the contacts to a CSV file which is stored on the SD card.

 

When I run this ported app on my BB10 Dev Alpha B device, it creates an empty file.

 

I guess BB10 Android runtime does not support contacts access in BB10.

 

Can anyone shine some light on this issue? 

 

Thanks,

Hemant

Developer
Posts: 648
Registered: ‎09-26-2012
My Device: Limited Edition Z10, Playbook 16GB/32GB, Dev Alpha A/B/C
My Carrier: Mobile Vikings

Re: Not able to read contacts from BB10 Dev Alpha (Android ported app)

I have no apps that use this information, so I cannot say if it works or not. But in the Release Notes of the Android Runtime they mention 'Contact Support'. They do not say anything about access of contacts though. But I would assume that if you can add contacts, you can return them.
http://developer.blackberry.com/android/documentation/bb_runtime_release_notes.html


A like is always appreciated,
but a nomination for BB Elite even more :-)
You can also contact me on Twitter: @ndsmyter
New Contributor
Posts: 7
Registered: ‎02-23-2013
My Device: BB10 Dev Alpha B
My Carrier: Idea

Re: Not able to read contacts from BB10 Dev Alpha (Android ported app)

Thanks for the reply. I have checked one more such app in Blackberry World. Even that app is unable to access and write contacts to the the CSV file. I guess Android runtime allows only writing to contacts and not retrieving.Even Android differentiates between write and read permissions.
Developer
Posts: 648
Registered: ‎09-26-2012
My Device: Limited Edition Z10, Playbook 16GB/32GB, Dev Alpha A/B/C
My Carrier: Mobile Vikings

Re: Not able to read contacts from BB10 Dev Alpha (Android ported app)

If it is not only your app, it will probably be not yet supported.

Maybe there is somebody who can confirm this problem? Is there a workaround that can be used for now?


A like is always appreciated,
but a nomination for BB Elite even more :-)
You can also contact me on Twitter: @ndsmyter
New Contributor
Posts: 7
Registered: ‎02-23-2013
My Device: BB10 Dev Alpha B
My Carrier: Idea

Re: Not able to read contacts from BB10 Dev Alpha (Android ported app)

I haven't yet found any work-around. I think if I want such app to be developed, then I may have to go native.
Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Not able to read contacts from BB10 Dev Alpha (Android ported app)

[ Edited ]

I have the same issue on a Z10. Also note that the unsupported API docs say "Contacts added or modified by android applications are currently not synchronized with the device address book".

 

http://developer.blackberry.com/android/apisupport/unsupportedapi_blackberry10_software_features.htm...

 

So what exactly is supported with contacts? Is there a workaround?

BlackBerry Development Advisor
Posts: 98
Registered: ‎11-21-2008
My Device: Z10
My Carrier: Bell

Re: Not able to read contacts from BB10 Dev Alpha (Android ported app)

Hi everyone,

 

Hopefully I can clarify what is supported within the BlackBerry Runtime for Android apps on BlackBerry 10 when it comes to Contacts support.

 

At this time, support is in place to add an entry into the Contacts list for either an existing contact, or to by adding a new contact to the list. This can be understood as write-only access. We do not support querying the contact list or backing up existing contacts. There were some security concerns behind the decision to only allow this level of access, but as always we're open to discussing various use cases.

James Dreher
BlackBerry Development Advisor
New Contributor
Posts: 7
Registered: ‎02-23-2013
My Device: BB10 Dev Alpha B
My Carrier: Idea

Re: Not able to read contacts from BB10 Dev Alpha (Android ported app)

Thanks a lot for clarification, jdreher.
Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Not able to read contacts from BB10 Dev Alpha (Android ported app)

Thanks for the reply James.

 

Can you explain why the documentation states that modified or new contacts are "not synchronized with the device address book"?

Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Not able to read contacts from BB10 Dev Alpha (Android ported app)

[ Edited ]

Also, why is it a security concern to allow both read/write access to contacts through Android runtime but its perfectly fine through Cascades (ContactService)? I'm kind of surprised you're looking for use cases because this is a fairly common feature.