deleting whole call log

by shaz » Fri, 19 Dec 2008 03:03:40 GMT

Sponsored Links
 I'm trying the whole call log  using following code

int deleted_rows = cur_context.getContentResolver().delete
(CallLog.Calls.CONTENT_URI, null,null);

The deletion is successful and whole call log is emptied but
deleted_rows always contain 0. Is this a bug in android ?

the following calls always work fine and return value is also correct

int deleted_rows = cur_context.getContentResolver().delete(Uri.parse
("content://sms"), null,null);
int deleted_rows =cur_context.getContentResolver().delete
(People.CONTENT_URI, null,null);

I testing on SDK version 1.0 using emulator.Please let me know if
there is any issue in my code and is this android bug?



deleting whole call log

by shahzad ahmad » Fri, 19 Dec 2008 17:22:41 GMT

 any help ?


Sponsored Links

Other Threads

1. How to use Android documentation ?

Hi guys,

I'm facing a productivity problem with Android. Basically, I can do
whatever I want with the framework, I always find out a solution to
everything I need to do.

My problem is, I never find a solution/explanation on the Android
developer web site. It just never happens.

For example, I'm just trying to save a picture to the SD card. With a
single google search, I find some code/explanation about
"getExternalStorageDirectory ()" on say StackOverflow. Look at it,
understand it, implement it on my own to be sure I grok it.

But then to be thorough, I make a second quick search and discover
MediaStore. Some people use it to store images. But no explanation at
all on what it is, what are the advantages, why I should use it. Does
it take care for me of the location/sd cars presence/sd card
mountability ?

And of course, the Android documentation is just plain useless on the
subject. Just gives me the methods and properties with laconic
sentences that are usually unhelpfull if I don't already know what it
is the purpose of the object.

So my question is : What am I missing ? How do you guys understand
what object to use and why when the documentation doesn't tell you ?

Again, I always find someone smarter than me who understood/debugged/
private investigated, so that I can always achieve what I meant to do,
but I've been developing for 20 years now and I find it tough to feel
so dumb.



2. Trying to get my head around multi screen densities. With more info

I have the following:

       android:anyDensity="true" />

My app currently only support the 480x800 screen size (I will be improving 
this, but that is how it is right now)  my question is:  Does 
android:anyDensity="true" mean Android will sort out the densities (despite the 
fact I have only provide 240dpi assets) or does it mean I need to provide 
assets for all known density classes?

I want to support the Galaxy TAB - it is a large screen (600x1024) with density 
of hdpi, it turns out that my HTC desire  has a large screen (480x800) with a 
density of hdpi.  So these devices are indistinguishable to android as they fit 
into the same categories. Now the issue is that i designed it to look great on 
the HTC and now I have the Galaxy I want to fix it to look good on that too.  
So the background image on the listView is 800 wide which looks great on the 
HTC but not so much on the TAB as it is centred and the icon that is on the 
left side on the HTC is blowing in the breeze on the TAB.  So I have some 
issues and I am really not getting anywhere.  So if anyone could point me in 
the right direction as to the proper process to follow to solve this I would be 
eternally grateful.   



3. Backlight is blinking.

4. Trying to get my head around multi screen densities.

5. How to get new input language in to the android? Who decides which new input languages for an IME should be added?

6. Virtual Keyboard covers EditText

7. Android NDK r5