problem in deleting Call Log

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

Sponsored Links

I can easily delete the whole call log with following code


I can query a particular call log with following code

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

            Cursor cursor =

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


Please guide me how to resolve this issue .



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

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


  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



Other Threads

1. Help, When copy a table from attached database. new table lost primary key.

I tried to copy a table from database1 into database2. with same table
name. But the problem is new table in database2 lost its primary key.
and sqlite seems not able to use Alter table to add new primary key.
need help.

here is how I did it:

mDb.execSQL("DROP TABLE IF EXISTS image");
//here I drop image table in database1

mDb.execSQL("attach  database ? as userdb", new String[]
//then I attached database1 to database2,

mDb.execSQL("CREATE TABLE image AS SELECT * FROM userdb.image;");
// copy image table from database1 (now as named userdb) into

At this point. I successfully copy image table. but new image table in
database2 lost its primary.   "_id" column was primary key in
database1 before, now it became just normal integer in database2.

I also tried  mDb.execSQL("ALTER TABLE image ADD PRIMARY KEY (_id);"),
but with no luck. I check SQLite office site. it doesn't support ALTER
TABLE to add primary key.

please someone give me a hint how to solve this problem.


2. Help! I'm begginer...

Hello everyone,

I'm begginer on Android... and I never develop something using it.
I'm just finding out on web how i can begin.

if you can help me, please, do that...

thanks for all!

Diogo Macedo
Analyser and Developer of Web Systems


3. Setting and testing state of WiFi Tether hotspot setting in 2.2

4. Bitmaps and OutOfMemoryError: Best Practices needed

5. Replacing Contact Application with new Contact application

6. Finish an activity not started from the service

7. GPS fix status detection