Retrieve the Starred Contacts

by Parbhakar Bikkaneti » Tue, 17 May 2011 16:41:46 GMT


Sponsored Links
 Hello everybody,

Please provide me a code/suggestions for performing the following tasks.

   1. Display a list of all the Starred contacts to the user.
   2. When user selects a contact, setting the
ContactsContract.Contacts.STARRED
   to 0

Thank-you.
-- 



Regards,
Bikkanati Prabhakar.
E-Mail: prabhakar.9...@gmail.com
Blog:     http://LetsXploreIT.blogspot.com 

-- 



Re: Retrieve the Starred Contacts

by Ali Chousein » Fri, 20 May 2011 03:52:54 GMT


 Prabhakar,

So far I've done some programming with Android contacts. I have much
sample code except the starred contacts. However it should be
straightforward. Check the link below. Personally I found it possible
to get everything running by following the documentation of
ContactsContract. There is good amount of sample code on the web as
well.

 http://developer.android.com/reference/android/provider/ContactsContract.html 

Good luck,
-Ali

-- 


Sponsored Links


Other Threads

1. How can I grab all keys? (including ENTER key)

Hi,
I need to grab all keys in my application, but have a little problem
when I'm using soft keyboard I didn't get event when press ENTER key,
other keys generate event onDown/Up, but onKey event never occurs.

Here is full source code:

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnKeyListener;

public class keylogger extends Activity {

   View v;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);
        v = (View)findViewById(R.id.View01);
        v.setOnKeyListener( new OnKeyListener() {
         public boolean onKey(View v, int keyCode, KeyEvent event) {
            // TODO Auto-generated method stub
            Log.d("test", "onKey");
            return false;
         }
      });
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
       // TODO Auto-generated method stub
       Log.d("test", "onKeyDown");
       return super.onKeyDown(keyCode, event);
    }

    @Override
    public boolean onKeyUp(int keyCode, KeyEvent event) {
       // TODO Auto-generated method stub
       Log.d("test", "onKeyUp");
       return super.onKeyUp(keyCode, event);
    }
}


--------------main.xml--------------
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">

<View android:id="@+id/View01"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</View>
</LinearLayout>


Cheers,
Marcin.

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

2. How do you prevent media from restarting when you rotate an android phone

Hi,

I am trying to make a game for android.  But when I rotate the android
phone my background music restarts.  How do I prevent this?

Any help would be appreciated.
Thanks.

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

3. Large Resources

4. Install app on a device?

5. Why does using People._COUNT cause IllegalArgumentException to be thrown?

6. Hi friends

7. unsubscribe me