04-14-2011 12:40 PM
My apps want to capture "unknown number" and "Private number", but
PhoenCallLog.getParticipant().getNumber() returns "" for both type of calls,
how can I seprate them?
thanks,
04-14-2011 01:30 PM
PhoneCall.getDisplayPhoneNumber will get you what you want. In order to get the PhoneCall object you could call Phone.getActiveCall() to give you the currently active incoming call.
If you have the PhoneListener interface implemented then you will have access to the callid and you could use Phone.getCall(int callId) to get the PhoneCall object
04-14-2011 03:05 PM
thanks spardhan,
I'm using PhoneLogListener to capture all missed phone calls.
is there a way retrive "Private number" info only use this listern?
Normally, we can see date, Phone# or "unknown number" or "Private number" when we view call log on a BB device, I wanto to get the same info in my apps.
so far, I have phonecalllog.getParticipant().getNumber() /getName(), / getDate()
but just could not figurate out how to get "Private number"
thanks,
04-14-2011 03:22 PM
Have you tried getAddressBookFormattedNumber from PhoneCallLogID?
04-14-2011 03:41 PM
just tried "getAddressBookFormattedNumber from PhoneCallLogID"
it returns a phone# if the phone# is presented
otherwise it returns null for both "unknown number" and "Private number"
as you mentioned I may have to use phonelistener.
thanks again.