Hi. I'm facing the same issue. My requirement is to get calls from the
call log after a certain date.
The following statement does not give error, but always fetches the
whole list:

Cursor c = DirectoryListing.mainActivity.getContentResolver().query(
        android.provider.CallLog.Calls.CONTENT_URI,
        null, (android.provider.CallLog.Calls.DATE + " > " +
lastFetchedDate), null,
        android.provider.CallLog.Calls.DATE + " ASC");

lastFetchedDate is an int value which is initially 0, but gets set to
the maximum value of the date field each time my method runs.

I'm new to Android development. Is there something wrong in my code?
Is date field in CallLog content provider not indexed/searchable?

Thanks,
Tan

On Mar 8, 5:12 pm, lerage <nogeekyn...@gmail.com> wrote:
> I am new to android and java and so sorry if its a simple question. I
> have tried to search but I am getting the answer nowhere. So, I am
> trying to getcalllogdetails using the CallLog.Calls content
> provider. I am able to get results with simple queries however I am
> not able to get any result when I try to run a WHERE query byDATE.
> Here's the query below ...
>
> Cursor c = getContentResolver().query(CallLog.Calls.CONTENT_URI, null,
>                CallLog.Calls.DATE+ "=?",
>                 new String[] {String.valueOf(date)}, ORDER_BY);
>
> As this query works when the WHERE clause include Number or Type (call
> type) etc., I think I am having problem (sometimes getting Illegal
> type error and sometimes getting no results but no errors) because I
> am not sure how exactly to convert theDatesupplied to epoch dates.
> How to do this? Any help people?
>
> Thank you

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to