Get Call logs Blackberry -
what want
hi, new bb development , want know how can phone call logs list attributes time, number etc programmatically ??
what read
i have read link not getting way implement. there not back upwards android or ios blackberry.
kindly suggest me code snippet. thanks
i assume want java (bbos) code.
in opinion, link referenced provides sufficient info code something, since seem need more, hope helps:
phonelogs _logs = phonelogs.getinstance(); int numberofcalls = _logs.numberofcalls(phonelogs.folder_normal_calls); system.out.println("number of calls: " + integer.tostring(numberofcalls)); ( int = 0; < numberofcalls; i++ ) { phonecalllog phonelog = (phonecalllog)_logs.callat(i,phonelogs.folder_normal_calls); int calltype = phonelog.gettype(); string calltypestring = ""; switch (calltype) { case phonecalllog.type_missed_call_opened: case phonecalllog.type_missed_call_unopened: calltypestring = "missed"; break; case phonecalllog.type_placed_call: calltypestring = "placed"; break; case phonecalllog.type_received_call: calltypestring = "received"; break; default: calltypestring = "unknown"; break; } phonecalllogid participant = phonelog.getparticipant(); system.out.println("call: " + integer.tostring(i) + " " + calltypestring + " " + participant.getaddressbookformattednumber()); } sample output (from debug log):
number of calls: 1 call: 0 placed 1 (234) 534-5343 5555 blackberry
No comments:
Post a Comment