sqlite - How to count the number of incoming calls a specific number has in callLog.calls? ANDROID QUERY CALL LOGS -


i have phonestatelistener retrieves incoming call number want have number queried , checked in calllog content provider , number of incoming calls specific number has made on specific date

and that, want check if number has incoming calls specific time given, if yes, calls ring, otherwise, no ring heard

the app considers person incoming calls frequent caller, if qualifies, considered important contact , calls ring

my problem is, how do in query?? heeelpp!!

you can use code as

   uri urlcall = uri.parse("content://call_log/calls/");    cursor receivec = null;    receivec = homeerasor.this.getcontentresolver().query(urlcall,                 null, "type='" + calllog.calls.incoming_type + "'", null,                 null);     if (c.movetofirst()) {         { 

//here information number , date compare same number different date , date should want.( calllog.call.date return time+date ) comparing how many times number called you.

            string num =c.getstring(c.getcolumnindex(calllog.calls._id));             string querystring = "_id=" + num;             // log.v("_id", querystring);                            // use value         } while (c.movetonext());     } 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -