android - how to detect if incomming miss calls are read -
i detecting missed calls using:
string[] projection = new string[]{calllog.calls.number, calllog.calls.type, calllog.calls.duration, calllog.calls.cached_name, calllog.calls._id}; string = calllog.calls.type+"="+calllog.calls.missed_type+" , new = 1"; cursor c = context.getcontentresolver().query(calllog.calls.content_uri,projection,where, null, null); c.movetofirst(); log.d("call", ""+c.getcount()); if(c.getcount() > 0) // code displays in textview number of missed calls; using flag displaying missed calls client.
is there way can reset textview value 0 if missed calls read?
is there broadcast receiver or announce me when missed calls read?
to information on missed calls. can use following.
string[] projection = { calllog.calls.cached_name, calllog.calls.cached_number_label, calllog.calls.type }; string = calllog.calls.type + "=" + calllog.calls.missed_type + " , " + calllog.calls.new + "=1" cursor c = this.getcontentresolver().query(calllog.calls.content_uri, selection,where, null, null); in cursor details of missed calls. have make call check if call read or not. think using timertask or using alarammanager can fill cursor once again. or if displaying in activity try fill once again when activity started.
hope you.
Comments
Post a Comment