I am creating a widget that you can assign a contact to onClick. I used the method that is described here. This works great on standard Android phones such as the Motorola Droid, HTC Nexus One and HTC G1. The problem is for users who are using devices such as the HTC Incredible or HTC Droid Eris (Both running Sense UI) and I imagine on other phones who’s OS deviates from the vanilla flavor of Android.
Using my current method I thought that the device’s OS would hook into whatever that manufacture chose to use for their Contact system however users are being sent to a random list of numbers, not their Contact list. Does anyone have a suggestion on how to get those Contacts or is this just another example of the Android fragmentation issue? Any help or insight is greatly appreciated.
ACTION_PICKworks just fine on all Android devices. However, bear in mind that the contacts API changed with Android 2.x, and the StackOverflow entry you linked to was from 13 months ago, back before Android 1.5 even existed (if I remember the timeline properly).Your best approach will be to create a common Java interface that handles your contact-related logic, with two implementations (one for the old API, one for the new). You can load up a static instance of the proper implementation for any given device and use it. You can see an example of that technique here.