Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
Posts: 4
Registered: ‎02-24-2012
My Device: Curve 9300
My Carrier: Vodafone

Unable to delete phone logs

On Blackberry 6.0, I have used the following code to delete all the call logs (basically it uses the standard PhoneLogs.deleteCall() API):

 

PhoneLogs logs = PhoneLogs.getInstance(); int lenNormal = logs.numberOfCalls(PhoneLogs.FOLDER_NORMAL_CALLS); for (int i = 0; i < lenNormal; i++) { logs.deleteCall(i, PhoneLogs.FOLDER_NORMAL_CALLS); } int lenMissed = logs.numberOfCalls(PhoneLogs.FOLDER_MISSED_CALLS); for (int i = 0; i < lenMissed; i++) { logs.deleteCall(i, PhoneLogs.FOLDER_MISSED_CALLS); } int total = lenNormal + lenMissed; Dialog.alert("Deleted: " + total); 

The dialog box says it has deleted N number of call logs but I still see the call logs in the phone. The program runs smoothly without any exception.

 

Googling and Blackberry forums say that: (1) Restart the phone, (2) Introduce some delay if you are deleting inside PhoneLogListener. I have tried those options too. But no luck!

 

I have also seen that this problem has been accepted as a bug by RIM-blackberry long time back. I failed to come across any solution though.

 

Thanks in advance for any help.

New Contributor
Posts: 4
Registered: ‎02-24-2012
My Device: Curve 9300
My Carrier: Vodafone

Re: Unable to delete phone logs

The phone logs get deleted from the Message list view but not from the Phone list view, if we use the standard PhoneLogs.deleteCall() API.

 

I searched a lot around but could not find any way to delete the logs from Phone list view.

BlackBerry Development Advisor
Posts: 15,700
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Unable to delete phone logs

What BlackBerry Smartphone model and BlackBerry handheld software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.

 

This issue has been logged in Issue Tracker here:  https://www.blackberry.com/jira/browse/JAVAAPI-2197

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 1,622
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: Unable to delete phone logs

this is a known problem.  You can delete the log from the actual logfile but the Phone app listview it stays shows the log.  I think the Phone app somehow caches the log and is saved elsewhere and it does not actually read the main call log.

New Contributor
Posts: 4
Registered: ‎02-24-2012
My Device: Curve 9300
My Carrier: Vodafone

Re: Unable to delete phone logs

Blackberry 9300 Curve

6.0 Bundle 2342