How to filter Contacts Based on Group

by s1516 » Thu, 25 Jun 2009 01:44:12 GMT


Sponsored Links
 Hi,

I have this query which gets all people in Contacts:

// Get a cursor with all people in Contacts
Cursor c = getContentResolver().query(People.CONTENT_URI, null, null,
null, null);

But how can I filter out some result based on GROUP value?

I was thinking of using the ' String selection, String[]
selectionArgs' argument in the query, but I can't since the Database
of the is like this, It does not has GROUP as its column:

CREATE TABLE people (_id INTEGER PRIMARY KEY
AUTOINCREMENT,_sync_account TEXT,_sync_id TEXT,_sync_time
TEXT,_sync_version TEXT,_sync_local_id INTEGER,_sync_dirty INTEGER NOT
NULL DEFAULT 0,_sync_mark INTEGER,name TEXT COLLATE LOCALIZED,notes
TEXT COLLATE LOCALIZED,times_contacted INTEGER NOT NULL DEFAULT
0,last_time_contacted INTEGER,starred INTEGER NOT NULL DEFAULT
0,primary_phone INTEGER REFERENCES phones(_id),primary_organization
INTEGER REFERENCES organizations(_id),primary_email INTEGER REFERENCES
contact_methods(_id),photo_version TEXT,custom_ringtone
TEXT,send_to_voicemail INTEGER,phonetic_name TEXT COLLATE LOCALIZED);

Thank you for any help.


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



Other Threads

1. Monitoring audio input

Hi all.

I want to monitor the audio via the microphone over a continuous
period of time. I don't want to record it, just get a handle on the
signal, to test for volume etc.

I've searched on the MediaRecorder and AudioRecord classes, and get
the feeling that this is possible, but I'm kind of stuck on how to
proceed.

Would appreciate any pointers.

-- 

2. Check when a Bluetooth Device is connected

Hello,

I'm trying to develop an app that knows the right moment the Bluetooth
Headset (or any other Bluetooth Device) is connected to the Phone. How
can I do it?

I already tried with BroadcastReceiver
(android.bluetooth.intent.action.HEADSET_STATE_CHANGED) defined in my
manifest but with no results...

<receiver android:name=".BluetoothReceiver"
      android:enabled="true">
      <intent-filter>
            <action
 
android:name="android.bluetooth.intent.action.HEADSET_STATE_CHANGED" /
      </intent-filter>
</receiver>


 public class BluetoothReceiver extends BroadcastReceiver {

           @Override
             public void onReceive(Context context, Intent intent) {
                        // Do stuff€              }
}


What's wrong?

I want to use 1.6 sdk.

Thanks in advance for your help.

Greetings

-- 

3. After removing OverlayItem tap events are still trigger

4. make my browser as default

5. Open API Service Hackathon at Mobile Developer Summit

6. Taking a Picture with the Camera - Without SurfaceView

7. android ksoap2 call return null value inside the webservice method