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,

  1. put right filter in cursor.
  2. iterate cursor collect data.

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -