Re: [android-developers] Re: How to get all contact's name phone number, email for 2.0

2009-11-26 Thread Mark Murphy
axel wrote: Back to the original question: Apps working well with 1.5/1.6 are broken with 2.0 - exactly the same problem I have. AFAIK the code below is perfectly valid and should continue to work with 2.0 - unfortunately it does not. String[] returnColumns = new String[] {

Re: [android-developers] Re: How to get all contact's name phone number, email for 2.0

2009-11-26 Thread Tim Jowers
Is there an API to determine the phone's version of Android? For now, I'm using try-catch. Sucky but works. Also, my 2.0 built APK does not run on my G1 phone. Maybe it's something I've done but I haven't dug into it. Maybe that's what you meant by intelligent class loading do you mean

Re: [android-developers] Re: How to get all contact's name phone number, email for 2.0

2009-11-26 Thread Mark Murphy
Tim Jowers wrote: Is there an API to determine the phone's version of Android? For now, I'm using try-catch. Sucky but works. android.os.Build.VERSION.SDK. Or, if you're only worrying about 1.6 and newer, use SDK_INT instead of SDK. Also, my 2.0 built APK does not run on my G1 phone. Maybe

Re: [android-developers] Re: How to get all contact's name phone number, email for 2.0

2009-11-26 Thread Tim Jowers
Sweet! Mark. Thanks for covering this. I don't see it solved anywhere on the Net or developer.android.com. Tim On Thu, Nov 26, 2009 at 7:42 AM, Mark Murphy mmur...@commonsware.com wrote: Tim Jowers wrote: Is there an API to determine the phone's version of Android? For now, I'm using

Re: [android-developers] Re: How to get all contact's name phone number, email for 2.0

2009-11-26 Thread Mark Murphy
Tim Jowers wrote: Sweet! Mark. Thanks for covering this. I don't see it solved anywhere on the Net or developer.android.com. A lot of this has been covered on this list before, either in the context of ContactsContract or more generally in the line of supporting different Android API versions.

Re: [android-developers] Re: How to get all contact's name phone number, email for 2.0

2009-11-26 Thread Tim Jowers
I agree with you Axel, I got it working. But shouldn't have had to do so. The larger moose is version compatibility. The industry standard is two versions back the API should work. Apache does not honor this. Now, Google is not either. It is PAINFUL to partner. In my case, 10 hours plus future

Re: [android-developers] Re: How to get all contact's name phone number, email for 2.0

2009-11-23 Thread Rachel Blackman
On Nov 20, 2009, at 6:09 PM, Padma wrote: Rachel: My understanding is that the contact Id in the Phone/Email table actually refers to the _ID in the ContactsContract.RawContacts table. You might want to first get the list of all Raw Contacts associated with the particular contact id and

Re: [android-developers] Re: How to get all contact's name phone number, email for 2.0

2009-11-20 Thread Rachel Blackman
On Nov 20, 2009, at 6:55 AM, Henry wrote: Now, it always return just one row. I tried several ways, like ContactsContract.CommonDataKinds.Email.CONTACT_ID + in ('1', '2', '3'); It always one row. If I just contact id 3, it will return contact 3. Do you know a way to get all the emails