On Nov 17, 2009, at 12:24 PM, androsag wrote:

> As has been discussed on this list, the 2.0 Contacts API is a
> significant overhaul. And that the 1.6 API has been deprecated.
> Usually this means use of the 1.6 API is discouraged but maintained
> for at least a little while. I am not that this is the case, however.
> The app I'm working on was built and tested for 1.6 and is now failing
> in the contacts code when built for 2.0. Does anyone know how Google
> intended us to target/support both 1.6 and 2.0 platforms in the same
> build? It seems we have to query for the api level (or at least,
> reflect for ContactsContract) and execute api level specific code. Yes/
> No?

I am reasonably certain that if you compile the app for 1.6 but run on 2.0, the 
contacts code will work.  The caveat here is that you will only get the raw 
contacts from the master account, rather than the combined contacts from all 
active accounts; the older API just doesn't have the functionality needed to 
handle combined accounts.

I think the 1.x contacts code is *supposed* to work when targeting 2.0, but 
most people seem to use private contacts API (often without knowing this), and 
/that/ breaks in 2.0.  From what the Google folks have said on list, however, 
I'm fairly sure the core, public, authorized and official 1.x API still works 
even if you target 2.0, albeit with the same caveats as above.

If I'm wrong on that, no doubt one of the Google folks can correct.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to