07/09/2009, 03:25 AM
|
#1 (permalink) |
|
Member
![]() Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
|
UPDATE 10-08-2009 - This patch is now available through webOS quick installer under the patch repositories - its also available using preware w/ the patch repository!! USE THE REMOVE COMMAND / SCRIPT BELOW TO REMOVE THIS PATCH BEFORE APPLYING THE ONE FROM THE REPOSITORY!
- UPDATE 09-29-2009 - UPDATED AND CERTIFIED FOR Palm WebOS v1.2.1 THIS HOWTO IS CERTIFIED FOR WEBOS v1.2.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!Notes: While working on a few other HACKS I came across a file that contained all the area-codes and their corresponding U.S. states in a function. It looks like the PALM Devs had this in there before, or they are working to include it in the future. I'm too impatient to wait so here is a method to get this now. What I did here is add the STATE name where it was possible to fit it in the caller-id, missed call pop-up, missed call notification, call log, and outgoing call display. This works with unknown numbers, because I usually know where someone in my contacts is located and don't need it for those. I have attached some screen-shots from the Pre to this post (Numbers distorted for their protection). 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:
# DISPLAY STATE FOR UNKNOWN CALLERS
#
mount -o remount,rw /
#
# RESTORE FILES
#
echo RESTORING ORIGINAL FILES IF AVAILABLE
cp /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.js
cp /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js
cp /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.js
cp /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.js
cp /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.js
#
# BACKUP FILES
#
echo BACKING UP ORIGINAL FILES
cp /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.js /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.js_1-1-0
cp /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js_1-1-0
cp /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.js /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.js_1-1-0
cp /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.js /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.js_1-1-0
cp /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.js /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.js_1-1-0
#
# MAKE MODIFICATIONS TO incomingcall-assistant.js
#
echo MAKING MODIFICATIONS TO incomingcall-assistant.js
sed -i "s/name = Messages.unknownCaller;/name = RegionLookup.regionFromPhoneNumber(number);/g" /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.js
#
# MAKE MODIFICATIONS TO calllog-assistant.js
#
echo MAKING MODIFICATIONS TO calllog-assistant.js
sed -i "s/item.label = '';/item.label = RegionLookup.regionFromPhoneNumber(item.number);/g" /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js
#
# MAKE MODIFICATIONS TO announcer-assistant.js
#
echo MAKING MODIFICATIONS TO announcer-assistant.js
sed -i "s/call.displayName = FormatPhoneNumber(number);/call.displayName = FormatPhoneNumber(number);\n\
var message = Messages.contactWithLabel;\n\
call.displayName = new Template(message).evaluate({\"contact\":call.displayName, \"label\":RegionLookup.regionFromPhoneNumber(number)});/g" /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.js
#
# MAKE MODIFICATIONS TO missedcall-assistant.js
#
echo MAKING MODIFICATIONS TO missedcall-assistant.js
sed -i "s/this.displayLabel = (this.contact.labelFormatted ? this.contact.labelFormatted : \"\");/this.displayLabel = (this.contact.labelFormatted ? this.contact.labelFormatted : RegionLookup.regionFromPhoneNumber(number));/g" /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.js
#
# MAKE MODIFICATIONS TO FormattedCall.js
#
echo MAKING MODIFICATIONS TO FormattedCall.js
sed -i "s/this.displayLabel = (callMsg\[lineNumber\].contact.labelFormatted ? callMsg\[lineNumber\].contact.labelFormatted : \"\");/this.displayLabel = (callMsg\[lineNumber\].contact.labelFormatted ? callMsg\[lineNumber\].contact.labelFormatted : RegionLookup.regionFromPhoneNumber(callMsg\[lineNumber\].number));/g" /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.js
#
# COMPLETE UPDATE
#
mount -o remount,ro /
echo INSTALLATION COMPELTE... REBOOTING DEVICE...
/sbin/reboot
#
( TO RESTORE ORIGINAL FUNCTION ) - If you ever need to recover your original files and set the PRE back to its defaults you can use the following: ** This will reboot your PRE so be sure to close all of your applications beforehand. ** Code:
mount -o remount,rw / # # RESTORE FILES # echo RESTORING ORIGINAL FILES IF AVAILABLE cp /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.js cp /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js cp /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.js cp /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.js cp /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.js # mount -o remount,ro / echo INSTALLATION COMPELTE... REBOOTING DEVICE... /sbin/reboot # -D2G - WEBOS VERSION CHANGELOG - - v1.2.0 - No Changes! - v1.1.0 - /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js - variable name changed from entry.label to item.label in replacement string. - v1.0.4 - FIRST HOWTO CREATED - Last edited by d2globalinc; 10/08/2009 at 12:56 PM. Reason: added extra space after reboot command. |
07/09/2009, 09:30 AM
|
#4 (permalink) |
|
Member
![]() Join Date: Jun 2009
Location: Palm Desert, CA
Posts: 249
Likes Received: 1
Thanks: 38
Thanked 47 Times in 22 Posts
|
really nice hack, quick and easy.
to make it more drawn out and less easy, you could allude to the backup script posted in the pre dev wiki "Modifying Stock Apps" for backing up the relevant files. ![]() predev.wikidot.com stock-application-mods yeah, I know what I just said, but.. Last edited by hmagoo; 07/09/2009 at 09:41 AM. |
07/09/2009, 10:28 AM
|
#12 (permalink) | |
|
Member
![]() Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
|
Quote:
- D2G |
|
07/09/2009, 10:37 AM
|
#14 (permalink) |
|
Member
![]() Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
|
Thats my guess as well - but I'm impatient and have to have it... well.. Like yesterday! :P
I see lots of hints of things to come in the code - so I'm very excited to see what is going to come down the line in the future.. -D2G |
07/09/2009, 10:38 AM
|
#15 (permalink) |
|
Member
![]() Join Date: Apr 2008
Posts: 259
Likes Received: 0
Thanks: 8
Thanked 64 Times in 30 Posts
|
d2globalinc -- I want to thank you for not only putting this out there, but actually taking the time to condense it into one simple easy-to-run script that works out of the box. Well done.
|
07/09/2009, 10:39 AM
|
#16 (permalink) | |
|
Member
![]() Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
|
Quote:
-D2G |
|
07/09/2009, 10:57 AM
|
#17 (permalink) |
|
Member
![]() Join Date: Apr 2009
Posts: 186
Likes Received: 0
Thanks: 19
Thanked 11 Times in 9 Posts
|
Ok I just made my attempt to do this, by copying in all the code and executing it. Phone rebooted.. Attempted to make a call and I don't see the state appearing.. What I do see is the type of number appearing: Home, Mobile, Work, etc... But that's always been there. So not sure what I did wrong....
|
07/09/2009, 10:58 AM
|
#18 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 599
Likes Received: 0
Thanks: 174
Thanked 44 Times in 34 Posts
|
Seems to work only in some instances. For example VM shows the state, but if I call someone from my contacts list it shows mobile, home, etc. However if I call a number not in my contacts it shows the state.
|
07/09/2009, 11:00 AM
|
#19 (permalink) | |
|
Member
![]() Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
|
Quote:
-D2G |
|
07/09/2009, 11:02 AM
|
#20 (permalink) | |
|
Member
![]() Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
|
Quote:
(ie. not in your contacts).
|
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://forums.webosnation.com/webos-development/191758-howto-show-state-location-u-s-numbers-incoming-outgoing-calls-log.html
|
||||
| Posted By | For | Type | Date | |
| Pre Central: There's a Patch For That! (Part 2) | Best Buy Mobile: everything mobile - every point of view | This thread | Refback | 05/11/2010 02:35 PM | |



