cursor - Call log in Android -
is there way 1 can log call history(only duration of call) particular contact in android. there "x" person in contact list, want find out duration of call both talked( both incoming , outgoing) in past days (it user given, can day, week, month etc.) .
i got across code while searching think might give last talk details. please correct if wrong.
string[] strfields = { android.provider.calllog.calls.number, android.provider.calllog.calls.type, android.provider.calllog.calls.cached_name, android.provider.calllog.calls.cached_number_type }; string strorder = android.provider.calllog.calls.date + " desc"; cursor mcallcursor = getcontentresolver().query( android.provider.calllog.calls.content_uri, strfields, null, null,strorder);
any great :)
there 2 approach,
- put right filter in cursor.
- iterate cursor collect data.
Comments
Post a Comment