problem in deleting Call Log

by shahzad ahmad » Wed, 18 Feb 2009 21:39:13 GMT


Sponsored Links
 Hi,

I can easily delete the whole call log with following code



getContentResolver().delete(CallLog.Calls.CONTENT_URI,null,null);



I can query a particular call log with following code

            delUri = Uri.withAppendedPath(CallLog.Calls.CONTENT_URI, "2");

            Cursor cursor =
getContentResolver().query(delUri,null,null,null,null);

But i always get unsupported function error when i try to delete a single
call log

            getContentResolver().delete(delUri,null,null);


Please guide me how to resolve this issue .

thanks,
shahzad

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



problem in deleting Call Log

by Chandra Mouli » Wed, 18 Feb 2009 21:49:43 GMT


 Try cursor.deleteRow() on the cursor you got from query.







-- 
G . chandra mouli

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


Sponsored Links


problem in deleting Call Log

by shahzad ahmad » Wed, 18 Feb 2009 23:14:04 GMT


 I'm using SDK 1.0 r2 . This fucntion cursor.deleteRow is deprecated in
latest SDK






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



problem in deleting Call Log

by david liu » Thu, 19 Feb 2009 01:35:31 GMT


 There are three paremeters for delete(delUri,null,null),  I think the first
one is about the table which you want to operate, the second is Where
clause, here you need put the selecting condition (such as, rowId = 2), the
third one we can use null.
You also can refer to the instruction of this method in the package
"android.database.sqlite.SQLiteDatabase".

On Wed, Feb 18, 2009 at 11:13 PM, shahzad ahmad






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



problem in deleting Call Log

by Gulfam » Fri, 06 Mar 2009 19:40:01 GMT


 Hi,

  I am facing the same problem for deleting perticullar call log
any one can help me i have tried as david liu said but not able to
delete

Regards,
Gulfam






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



Other Threads

1. How to convert Drawable into Bitmap?

Hello,

how do I convert a Drawable into a Bitmap?

Greetings,
Marco

-- 

2. layout_width as a % of layout_height

What I am trying to do is make my game center in any screen with the
best fit to screen and maintain ratio. Is there a good way to do this?
This is my current xml. I have an outer linearlayout to center the
middle one, all good in most resolutions but doesn't work well in
WQVGA400. If I could make the layout_width a percentage of
layout_height I think I could solve my issue as I can make
layout_width = fill_parent, and then make make layout_height use a %
of layout_width which should maintain aspect ratio. Actually I don't
even understand why the below concept doesnt work on a WQVGA400
screen??

<LinearLayout android:id="@+id/outerlayout"
        android:orientation="vertical" android:layout_width="fill_parent"
        android:layout_height="fill_parent" xmlns:android="http://
schemas.android.com/apk/res/android"
        android:gravity="center">
        <LinearLayout android:layout_width="320dip"
                android:layout_height="480dip" xmlns:android="http://
schemas.android.com/apk/res/android"
                android:focusable="true" android:focusableInTouchMode="true"
                android:background="@drawable/menu_background" android:id="@+id/
main_menu">

                <LinearLayout android:orientation="vertical"
                        android:layout_centerInParent="false" 
android:focusable="true"
                        android:focusableInTouchMode="true"
android:layout_alignParentTop="false"
                        android:layout_alignParentBottom="false"
                        android:layout_alignParentLeft="false"
                        android:layout_centerHorizontal="false"
                        android:layout_centerVertical="false"
                        android:layout_alignParentRight="false"
android:layout_marginLeft="170dip"
                        android:layout_height="wrap_content"
android:layout_width="wrap_content"
                        android:background="@drawable/scroll_7buttons"
                        android:layout_marginTop="150dip" 
android:id="@+id/mainMenuLayout">
                </LinearLayout>
        </LinearLayout>
</LinearLayout>

-- 

3. Sharing SOFTWARE-SOFTWARE yang Keren-keren dong. Kira-kira APA?

4. Authenticating with Youtube: ClientLogin?

5. how to turn off activity transitions

6. how to run adb shell on windows as super user

7. CyanogenMod-5.0.4 is out!