BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/index.php)
-   Developer Forum (http://www.blackberryforums.com/forumdisplay.php?f=15)
-   -   CallLog updating Problem? (http://www.blackberryforums.com/showthread.php?t=99472)

dangihitesh 10-11-2007 04:56 AM

CallLog updating Problem?
 
Hi All,

I having one app in which after voice call has been disconnected i m trying to update calllog with another number. The code works fine but i did not get updated calllog entry. I m getting updated calllog entry after when i restart my simulater/device.

The code is as follows:

public static void deleteAndUpdateLog(String deleteCallLogNumber,
String updateCallLogNumber) {
try {
PhoneLogs logs = PhoneLogs.getInstance();

int index = getIndexOfLatestCallLog(deleteCallLogNumber);
if (index != -1) {
PhoneCallLog calllog = (PhoneCallLog) logs.callAt(index,FOLDER_TYPE);

if (calllog.getParticipant().getNumber().equals(
deleteCallLogNumber)) {

PhoneCallLogID phoneCallLogID = new PhoneCallLogID( updateCallLogNumber);


calllog.setParticipant(phoneCallLogID);

logs.swapCall(calllog, index, FOLDER_TYPE);

//**********OR**************
//logs.deleteCall(index, FOLDER_TYPE);
//logs.addCall(calllog);


}

}

} catch (Exception e) {
System.out.println("Error from calllog" + e);
}


Any solution for this issue....plz help

Thanks in advance

neil1967 11-13-2008 11:32 AM

Did you ever get an answer to this? I'm having the same problem.

abhsax1978@hotmail.com 11-17-2008 06:09 AM

Have you used phoneLogListener.
it notifies you whenever the log is updated.

Code:

public class Calls implements PhoneLogListener {
//PhoneListener,
   
    private static PhoneLogs _phoneLogs;
     

    public Calls() {
       
        _phoneLogs = PhoneLogs.getInstance();
        PhoneLogs.addListener(this);
       
    }
}


neil1967 11-20-2008 10:19 AM

Haven't tried this yet, but I'm not sure this is the solution. I don't want to initiate any action upon changes to the call log, I want to have an app change the call log, and as soon as it does, have the UI to that log (when you hit the green button) reflect it without rebooting the phone. How would I force this?

Thanks!

simon.hain 11-21-2008 09:34 AM

the bug was issued to rim some time ago and is officially recognized.


All times are GMT -5. The time now is 02:59 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.