ContentResolver query Grammar

by Ivy » Fri, 17 Jul 2009 11:36:12 GMT


Sponsored Links
 String phonenumberString=PhontUliti.formatPhoneNumber(number);
            String[] contactsProjection=new String[]
{People.NAME,People._ID,People.NUMBER,Contacts.Phones.TYPE};
            Cursor contactsCursor=context.getContentResolver().query
(People.CONTENT_URI,
                           contactsProjection, People.NUMBER +" = " 
+phonenumberString,
                           null, People.DEFAULT_SORT_ORDER);

Why the contactsCursor is null?
The number is in   the contacts.
Is there any mistakks in the query?
--~--~---------~--~----~------------~-------~--~----~



ContentResolver query Grammar

by Ivy » Fri, 17 Jul 2009 11:59:50 GMT


 The PhontUliti.formatPhoneNumber(String number) replace "" within
"-".And if i change like this  the cursor is also null
 String[] contactsProjection=new String[]
{People.NAME,People._ID,People.NUMBER,Contacts.Phones.TYPE};
            Cursor contactsCursor=context.getContentResolver().query
(People.CONTENT_URI,
                           contactsProjection, PhontUliti.formatPhoneNumber( 
People.NUMBER )
+" =?",
                           new String[]{"15827381718"}, 
People.DEFAULT_SORT_ORDER);




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. OpenGL Error 1281 loading textures on Droid in native resolution

Just started testing my games on the Droid in native res (any density
enabled).  I've been using (scaled density) compatibility mode up
until now.  Everything works except for the textures.

OpenGL throws error 1281 (Invalid Value) when loading in that mode
(480x854).  Everything loads fine when I go back to compatibility
(320x597).

I'm trying to use GLUtils.texImage2D(GL10.GL_TEXTURE_2D, level,
bitmap, 0).  That's it.  I used a GLSurfaceView to configure GL so all
settings should be standard/default.

This is working on every device except the Droid and it even works on
it when I don't have "any density" enabled.  Is this a bug or am I
actually doing something wrong?

-- 

2. Bluetooth Developers Guide and Bluetooth Sample Code

Hi Bluetooth Developers,

We have just published an Android Bluetooth Developers Guide, and a
Sample Application. See links below.
http://developer.android.com/guide/topics/wireless/bluetooth.html
http://developer.android.com/resources/samples/BluetoothChat/index.html

I hope these become a useful resource,

Happy Holidays,
Nick Pelly
Android Bluetooth Project Lead

-- 

3. MobiForms Developer Tool Now Supports Google Android Smartphones

4. TTS TalkBack doesn't read AlertDialog titles or messages?

5. App from HTC

6. Localized to: unknown even though I have localized strings

7. Hebrew font on Android!