webOS Nation Forums >  webOS apps and software >  webOS development > HOWTO - Enable Call Duration Display in Call Log
HOWTO - Enable Call Duration Display in Call Log

  Reply
 
LinkBack Thread Tools Display Modes
Old 07/09/2009, 03:43 PM   #1 (permalink)
Member
 
d2globalinc's Avatar
 
Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
Default HOWTO - Enable Call Duration Display in Call Log

- UPDATE 08-29-2009 - THIS PATCH IS NOW INCLUDED AS A PATCH IN THE WEBOS QUICK INSTALL APPLICATION - YOU SHOULD USE THAT NOW INSTEAD OF THIS HOWTO!

- UPDATE 07-24-2009 - UPDATED AND CERTIFIED FOR Palm WebOS v1.1.0

THIS HOWTO IS CERTIFIED FOR WEBOS v1.1.0 - DO NOT USE THIS FOR OLDER VERSIONS OF WEBOS!

This HOWTO requires that you already have root access to your phone. If you need more information on how to do that search the forum.

Click Here to search for my HOWTO's and Answers for the Palm PRE!

UPDATE JULY 13TH, 2009 #1:
CHANGED OUTPUT DISPLAY FROM hr, min, sec to h,m,s SO IT TAKES UP LESS DISPLAY REAL ESTATE. - ADDED REVISED SCREENSHOT
(To update just go through original update again. No need to disable / restore first, it will do it all for you.)


UPDATE JULY 13TH, 2009 #2:
Removed extra un-needed space between the number and the label on m,h,s.


NOTES:
This was taken from the original post over at predev.wikidot.com/hidden-features - I just put it into a simple script/command set that you can just copy and paste into your ssh / terminal window. Thanks to predev.wikidot.com for the information!

USAGE:
Open your phone application and click on the "Call Log" button. Once this modification is enabled you will see the amount of time spent on a call (according to your Palm Pre - not Sprint!) in minutes and seconds.. ** Sometimes the call duration text may run into the contacts picture in the call-log - this is only cosmetic - so if it bugs me too much I may adjust this in the future - but it suits its purpose for now!

Picture below shown with this modification and the STATE Caller modification which can be obtained here: http://discussion.treocentral.com/we...calls-log.html



UPDATE - JULY 13TH, 2009 #1 - SCREENSHOT


UPDATE - JULY 13TH, 2009 #2 - SCREENSHOT



The HowTO:

I'll try to make this as simple as possible.

1. Login to your Palm PRE and obtain root access.. (Again look around the forums to see how to do this)

2. Once you are at the "root@castle" prompt COPY and PASTE all of the following code into your terminal / putty / ssh window.. (These commands will make backup copies of the original files, then modify them)


** This will reboot your PRE so be sure to close all of your applications beforehand. **
[code]
#
# ENABLE CALL DURATION DISPLAY IN CALL LOG
#
#
# SET CALL DURATION DISPLAY TO ON
#
mount -o remount,rw /
# RESTORE FILES
#
echo RESTORING ORIGINAL FILES IF AVAILABLE
cp /usr/palm/applications/com.palm.app.phone/app/models/DateFormatter.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/models/DateFormatter.js
#
# BACKUP FILES
#
echo BACKING UP ORIGINAL FILES
cp /usr/palm/applications/com.palm.app.phone/app/models/DateFormatter.js /usr/palm/applications/com.palm.app.phone/app/models/DateFormatter.js_1-1-0
#
# MAKE MODIFICATIONS TO DateFormatter.js - PART 1
#
echo MAKING MODIFICATIONS TO DateFormatter.js - PART 1
sed -i "s/ hr\ /h\ /g" /usr/palm/applications/com.palm.app.phone/app/models/DateFormatter.js
#
# MAKE MODIFICATIONS TO DateFormatter.js - PART 2
#
echo MAKING MODIFICATIONS TO DateFormatter.js - PART 2
sed -i "s/ min\ /m\ /g" /usr/palm/applications/com.palm.app.phone/app/models/DateFormatter.js
#
# MAKE MODIFICATIONS TO DateFormatter.js - PART 3
#
echo MAKING MODIFICATIONS TO DateFormatter.js - PART 3
sed -i "s/\" sec\"): \"0 sec\"/\"s\"): \"0s\"/g" /usr/palm/applications/com.palm.app.phone/app/models/DateFormatter.js
#
echo SETTING CALL DURATION DISPLAY TO ON
luna-send -n 1 palm://com.palm.systemservice/setPreferences '{"phoneAppHideCallDuration": false}'
#
# SET CALL DURATION DISPLAY TO ON IN DATABASE
#
echo SETTING CALL DURATION DISPLAY TO ON IN DATABASE
sqlite3 /var/palm/data/cookies.db 'update Cookies set value = "%220%22" where domain_head = ".usr.palm.applications.com.palm." and domain_tail = "app.phone" and path = "/usr/palm/applications/com.palm.app.phone" and "name" = "mojo_cookie_hidecalllogduration";'
#
# COMPLETE UPDATE
#
mount -o remount,ro /
echo INSTALLATION COMPELTE... REBOOTING DEVICE...
/sbin/reboot
#

[/code]

Good Luck! And Happy Hacking!!

- D2G


To restore original files use the following:
[code]
#
# DISABLE CALL DURATION DISPLAY IN CALL LOG
#
mount -o remount,rw /
#
# RESTORE FILES
#
echo RESTORING ORIGINAL FILES IF AVAILABLE
cp /usr/palm/applications/com.palm.app.phone/app/models/DateFormatter.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/models/DateFormatter.js
#
# SET CALL DURATION DISPLAY TO OFF
#
echo SETTING CALL DURATION DISPLAY TO ON
luna-send -n 1 palm://com.palm.systemservice/setPreferences '{"phoneAppHideCallDuration": true}'
#
# SET CALL DURATION DISPLAY TO OFF IN DATABASE
#
echo SETTING CALL DURATION DISPLAY TO ON IN DATABASE
sqlite3 /var/palm/data/cookies.db 'update Cookies set value = "%221%22" where domain_head = ".usr.palm.applications.com.palm." and domain_tail = "app.phone" and path = "/usr/palm/applications/com.palm.app.phone" and "name" = "mojo_cookie_hidecalllogduration";'
#
# COMPLETE UPDATE
#
mount -o remount,ro /
echo INSTALLATION COMPELTE... REBOOTING DEVICE...
/sbin/reboot
#

[/code]
Attached Images
File Type: jpg call-duration-1.jpg (88.9 KB, 797 views) Email Attachment
File Type: jpg phone_2009-13-07_042041.jpg (77.6 KB, 531 views) Email Attachment
File Type: jpg phone_2009-13-07_053525.jpg (76.9 KB, 500 views) Email Attachment

Last edited by d2globalinc; 08/29/2009 at 12:28 PM. Reason: UPDATE JULY 13TH, 2009
d2globalinc is offline   Reply With Quote
Old 07/09/2009, 03:44 PM   #2 (permalink)
Member
 
Join Date: Jun 2009
Posts: 26
Likes Received: 0
Thanks: 4
Thanked 3 Times in 1 Post
Default

thank you so much bro. will try it out.
ldostang is offline   Reply With Quote
Old 07/09/2009, 03:52 PM   #3 (permalink)
Member
 
d2globalinc's Avatar
 
Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
Default

Quote:
Originally Posted by ldostang View Post
thank you so much bro. will try it out.
Let me know if it doesn't work - I may have to adjust the SQL entry here..
d2globalinc is offline   Reply With Quote
Old 07/09/2009, 03:55 PM   #4 (permalink)
Member
 
Join Date: Jun 2009
Posts: 26
Likes Received: 0
Thanks: 4
Thanked 3 Times in 1 Post
Default

Quote:
Originally Posted by d2globalinc View Post
Let me know if it doesn't work - I may have to adjust the SQL entry here..
yeah it didnt work. i can try it again but im sure i did it right. the other three you posted worked with no problem.
ldostang is offline   Reply With Quote
Old 07/09/2009, 04:02 PM   #5 (permalink)
Member
 
d2globalinc's Avatar
 
Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
Default

Quote:
Originally Posted by ldostang View Post
yeah it didnt work. i can try it again but im sure i did it right. the other three you posted worked with no problem.
The original didn't copy and paste right into the forums.. I'm making my edits, and it should be back up here shortly

- D2G
d2globalinc is offline   Reply With Quote
Old 07/09/2009, 04:03 PM   #6 (permalink)
Member
 
Webby_s's Avatar
 
Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
Default

I may just try rooting my Pre again! If it is truely this easy! Weekend project.
Webby_s is offline   Reply With Quote
Old 07/09/2009, 04:03 PM   #7 (permalink)
Member
 
Join Date: Jun 2009
Posts: 26
Likes Received: 0
Thanks: 4
Thanked 3 Times in 1 Post
Default

Quote:
Originally Posted by d2globalinc View Post
The original didn't copy and paste right into the forums.. I'm making my edits, and it should be back up here shortly

- D2G
cool. thx.

nevermind. got it.
ldostang is offline   Reply With Quote
Old 07/09/2009, 04:05 PM   #8 (permalink)
Member
 
d2globalinc's Avatar
 
Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
Default

Should be good to go now! - Both enable and disable set of commands work!

- D2G
d2globalinc is offline   Reply With Quote
Old 07/09/2009, 04:07 PM   #9 (permalink)
Member
 
d2globalinc's Avatar
 
Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
Default

Quote:
Originally Posted by ldostang View Post
cool. thx.

im trying to do some edits manually at the moment with vi but for some reason its telling me "'q' is not implemented". any ideas
i usually have to hit ESC - then ":" w/o quotes - then type in quit or quit! if you made changes and don't want to save..

I also recommend using nano - and installing that if you havn't already on the command line - its a much easier editor than vi..

- D2G
d2globalinc is offline   Reply With Quote
Old 07/09/2009, 04:08 PM   #10 (permalink)
Member
 
Join Date: Jun 2009
Posts: 26
Likes Received: 0
Thanks: 4
Thanked 3 Times in 1 Post
Default

Quote:
Originally Posted by d2globalinc View Post
i usually have to hit ESC - then ":" w/o quotes - then type in quit or quit! if you made changes and don't want to save..

I also recommend using nano - and installing that if you havn't already on the command line - its a much easier editor than vi..

- D2G
thanks. i'll try it.

cool. worked now. also my manual hack worked too. i was so afraid of rooting my pre but everything so far so good at the moment.

Last edited by ldostang; 07/09/2009 at 04:18 PM.
ldostang is offline   Reply With Quote
Old 07/09/2009, 04:24 PM   #11 (permalink)
Member
 
d2globalinc's Avatar
 
Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
Default

Quote:
Originally Posted by ldostang View Post
cool. worked now. also my manual hack worked too. i was so afraid of rooting my pre but everything so far so good at the moment.
Yah, its nothing to be afraid of - just as long as you backup all the files before editing them, and make sure you always have a way to get ssh / root access - its a-OK! - And even if there was something MAJOR that went wrong when messing around in there - you can always recover back to factory.. I may be releasing the Browser Download Howto later today - so keep an eye out

Have fun


- D2G
d2globalinc is offline   Reply With Quote
Old 07/09/2009, 04:32 PM   #12 (permalink)
Member
 
Join Date: Jun 2009
Posts: 26
Likes Received: 0
Thanks: 4
Thanked 3 Times in 1 Post
Default

Quote:
Originally Posted by d2globalinc View Post
Yah, its nothing to be afraid of - just as long as you backup all the files before editing them, and make sure you always have a way to get ssh / root access - its a-OK! - And even if there was something MAJOR that went wrong when messing around in there - you can always recover back to factory.. I may be releasing the Browser Download Howto later today - so keep an eye out

Have fun


- D2G
thanks for all your help bro. i'll look out for it. i was able to add the sms time/date stamp hack and the add/delete launcher pages hack.

now i want to make changes to the background dialer and add the longer dictionary list. but they take a little more time.
ldostang is offline   Reply With Quote
Old 07/09/2009, 04:45 PM   #13 (permalink)
Member
 
d2globalinc's Avatar
 
Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
Default

Quote:
Originally Posted by ldostang View Post
thanks for all your help bro. i'll look out for it. i was able to add the sms time/date stamp hack and the add/delete launcher pages hack.
Nice - I'm actually about to add the add/delete launcher one here in about 5 minutes :P

-D2G
d2globalinc is offline   Reply With Quote
Old 07/09/2009, 04:51 PM   #14 (permalink)
Member
 
Join Date: May 2009
Posts: 160
Likes Received: 0
Thanks: 94
Thanked 129 Times in 27 Posts
Default

Thanks very easy to set up.
chrissurra is offline   Reply With Quote
Old 07/10/2009, 11:27 AM   #15 (permalink)
Member
 
Webby_s's Avatar
 
Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
Default

Thanks again for these awesome How-To's!!
Webby_s is offline   Reply With Quote
Old 07/10/2009, 01:58 PM   #16 (permalink)
zxi
Member
 
Join Date: Jul 2009
Posts: 15
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
Default

Just what I was looking for! :-)
zxi is offline   Reply With Quote
Old 07/10/2009, 04:27 PM   #17 (permalink)
Member
 
Join Date: Jun 2009
Posts: 27
Likes Received: 0
Thanks: 4
Thanked 1 Time in 1 Post
Default

works great... I also did the change the colors on the dialer mod and it is awesome as well... Nice work on the how to!
onebelow0 is offline   Reply With Quote
Old 07/11/2009, 04:36 AM   #18 (permalink)
Member
 
Join Date: Jun 2009
Posts: 19
Likes Received: 0
Thanks: 1
Thanked 7 Times in 7 Posts
Default

These HOWTO's are great. Thanks.
bobvr is offline   Reply With Quote
Old 07/12/2009, 01:32 PM   #19 (permalink)
Member
 
Inline325i's Avatar
 
Join Date: Jun 2009
Location: Nashville, TN
Posts: 25
Likes Received: 0
Thanks: 30
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by d2globalinc View Post
Yah, its nothing to be afraid of - just as long as you backup all the files before editing them, and make sure you always have a way to get ssh / root access - its a-OK! - And even if there was something MAJOR that went wrong when messing around in there - you can always recover back to factory.. I may be releasing the Browser Download Howto later today - so keep an eye out

Have fun


- D2G
Ok, having never rooted my Pre or not knowing or understanding much of the lingo on how to do it I took the plunged followed the steps completely then applied this to my Pre.

BAM!!! Works like a charm!!! THANKS!!!!!!

Gotta admit I was a bit nervous though!
Inline325i is offline   Reply With Quote
Old 07/12/2009, 05:57 PM   #20 (permalink)
Member
 
DNic's Avatar
 
Join Date: Jun 2009
Posts: 599
Likes Received: 0
Thanks: 174
Thanked 44 Times in 34 Posts
Default

Thanks!

Not sure if its possible, but maybe change min to m and sec to s. Maybe that will prevent the cut off.
DNic is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0