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 to speed up the boot up process in Android?

Hi All,

I am using Android 2.1 on a CE device. It takes some 54 seconds to
boot up (to show the home screen). I would like to speed up this
process. Please guide me with some pointers so that i can reduce this
boot time.

I understand that many of the services like bluetooth, RILD etc are of
no use to me.

Thanks & Regards,
Sen

-- 

2. Gmail application bottom button type UI

I have a custom list view displaying contacts from the phone book with
checkbox on each name row. when user checks on an item I need to
display "Done" button at the bottom of the screen.

My custom Activity extends ListAcvitity through adapter populates each
row with the checbox. Custom layout as below
===========
layout.xml
===========
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@id/android:list"    xmlns:android="http://
schemas.android.com/apk/res/android"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:orientation="horizontal">

        <CheckBox android:text=""
                android:id="@+id/checkBox"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="25sp"/>
        <TextView
                android:id="@+id/number"
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
                 android:layout_below="@id/checkBox"
                android:layout_alignBottom="@id/number"
                android:textSize="15sp"/>

        </RelativeLayout>

have two fold question
1)how can I display a button at the bottom of the screen (not at the
end of the list). I understand since I extend ListActivity can't use
setContentView(R.layout.main)  where main.xml could have a button but
can't really mix it with custom layout.

2)Need to display "Done" button only when at least one item is checked
in the list. This is exactly same as how Gmail app on Android works.
when you check an item it displays "Archive Delete Labels" buttons.
and if none item is checked there shouldn't be a button on the
screen.

Any ideas?

Thanks,

-- 

3. My first Android App

4. converting to regular java

5. How to Keep Widget Application Status/State

6. Is /system/bin/dalvikvm reliable on all Android devices?

7. How to create an app as a service and make it invisible to the user?