Hello, I have the same problem too. When I add a call to the calllog
the name becomes "unknown" with my HTC Desire 2.2, while in the
Emulator it works fine.
This is the code:
private void addToCallLog(){
String phoneName = "Test Tested";
String originalNumber = "11223233445";
ContentValues values = new ContentValues();
values.put(CallLog.Calls.CACHED_NAME, phoneName);
values.put(CallLog.Calls.NUMBER, originalNumber);
//values.put(CallLog.Calls.CACHED_NUMBER_LABEL, phoneNumber);
values.put(CallLog.Calls.DURATION,((endCall - startCall) /
1000 ) - 2 );
values.put(CallLog.Calls.DATE,System.currentTimeMillis() );
Uri uri =
getContentResolver().insert(CallLog.Calls.CONTENT_URI, values);
}
Did you solved it? how?
Thanks
On Nov 13, 2:46 pm, Anders <[email protected]> wrote:
> Hello. I'm trying to update the CalLog to change the name/cached name
> of an entry. I have successfully updated a row but once i go into
> thecalllogon my phone the displayed name is removed after a short
> moment. I figured this is because the number of the incoming called is
> not found in any of the contacts. But why would it then clear the
> cached name that is in theLog?
> If the number is not in contacts thecalllogshould display the
> cached name without trying to refresh it? Atleast that's the behaviour
> I expect.
>
> So, my question is: Is it possible to add a name to an incoming number
> to display in thecalllogwithout adding the number and name to the
> contact list? I've figured it should be possible to add the contact
> first, then mark it as removed and thus get it displayed in thecalllogbut
> that seems like a stupid work-around.
>
> // Anders
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en