I am working on the recentcall list of android device and i am getting one problem with the CallLog.Calls.CACHED_NAME
there can be two cases of recent call that number can be in contact list name or it can be unknown. so if name will be exist in the contact then it will be displayed in CallLog.Calls.CACHED_NAME but if it is unknown number then what value it will give?
because if i compare that if cached name is null then i am putting number as a name but in simulator it works fine but when i install it in samsung galaxy ACE DUOS, if recent calls have unknown number then it crashes.
For example,
Recent call is ABC : 888-888-8888, XYZ : 999-999-9999
then it will work fine.
But if it will be NO NAME : 444-444-4444
then it will crash.
Anyone can tell what can be the problem with this issue?
I had a same problem when I tried to get phone numbers from call log who had no name. The
CallLog.Calls.CACHED_NAMEdidn’t return any value, even null.After a while I solved this problem by bilding this cursor:
It return only the numbers without contact name.