webOS Nation Forums > webOS apps and software > webOS development > HOWTO - Enable text and e-mail message forwarding.
1 2 3 4 5 6 
Member: d2globalinc
at: 11:55 AM 07/09/2009
- UPDATE 08-27-2009 - I personally stopped using this update - because of the annoynce with tapping a message and having it do a forward when I did not want it to. I have been away from the scene for a few weeks, but I think there might be better ways of doing this now. Search the forums before deciding to use this HowTO to be sure!

- 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!

NOTES:
This was taken from the original post over at predev.wikidot.com/forward-messages - 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:
To forward a message, open the Messaging application, tap a chat thread, then tap an individual message. If the message has an attachment, make sure you tap on the text of the message. A new compose card will open with the message text pre-populated. Simply choose the recipient(s).

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 TXT AND EMAIL MESSAGE FORWARDING
#
mount -o remount,rw /
#
# RESTORE FILES
#
echo RESTORING ORIGINAL FILES IF AVAILABLE
cp /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js_1-1-0 /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js
cp /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
#
# BACKUP FILES
#
echo BACKING UP ORIGINAL FILES
cp /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js_1-1-0
cp /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js_1-1-0

#
# MAKE MODIFICATIONS TO messaging-luna-service.js
#
echo MAKING MODIFICATIONS TO messaging-luna-service.js
sed -i "s/telephonyIdentifier: 'palm:\/\/com.palm.telephony',/telephonyIdentifier: 'palm:\/\/com.palm.telephony',\n\
forwardIdentifier: 'palm:\/\/com.palm.applicationManager',\n\
\n\
forwardMessage: function(sceneController,messageText) {\n\
return sceneController.serviceRequest(MessagingMojoService.forwardIdentifier,{\n\
method: 'launch',\n\
parameters: {\n\
id: 'com.palm.app.messaging',\n\
params: {\n\
messageText: 'FWD: '+messageText\n\
}\n\
}\n\
});\n\
},\n\
/g" /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js
#
# MAKE MODIFICATIONS TO chatview-assistant.js
#
echo MAKING MODIFICATIONS TO chatview-assistant.js
sed -i "s/MessagingUtils.simpleListClick(this.controller.get(event.originalEvent.target), \"chatRow\", function(targetRow){/if (!mmsImageTarget \&\& !mmsVideoTarget \&\& !mmsVcardTarget \&\& !mmsVcalTarget) {\n\
MessagingMojoService.forwardMessage(this.controller, event.item.messageText);\n\
}\n\
\n\
MessagingUtils.simpleListClick(this.controller.get(event.originalEvent.target), \"chatRow\", function(targetRow){/g" /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
#
# COMPLETE UPDATE
#
mount -o remount,ro /
echo INSTALLATION COMPELTE... REBOOTING DEVICE...
/sbin/reboot
#

[/code]

Good Luck! Happy Hacking!

-D2G

To restore original files use the following:

[code]
#
# DISABLE TXT AND EMAIL MESSAGE FORWARDING
#
mount -o remount,rw /
#
# RESTORE FILES
#
echo RESTORING ORIGINAL FILES IF AVAILABLE
cp /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js_1-1-0 /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js
cp /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
#
mount -o remount,ro /
echo INSTALLATION COMPELTE... REBOOTING DEVICE...
/sbin/reboot
#

[/code]
Reply
Member: though
at: 12:09 PM 07/09/2009
Holy *** Been wanting this! PALLLLLLLLLLM, HIRE THIS GUY!
Reply
Member: DNic
at: 12:49 PM 07/09/2009
Nice! Really need a How-to sub forum.
Reply
Member: Kimleng
at: 12:51 PM 07/09/2009
I've been using this for a couple weeks Great job! May I ask if it's possible to add a tweak?

Make it so we have to hold down for at least a second before executing. This way, when we click on URLs, they don't load up the browser and the fwd message window. Not sure how hard that is to implement, but I'll also see if I can figure it out.
Reply
Member: d2globalinc
at: 01:19 PM 07/09/2009
Originally Posted by Kimleng:
I've been using this for a couple weeks Great job! May I ask if it's possible to add a tweak?

Make it so we have to hold down for at least a second before executing. This way, when we click on URLs, they don't load up the browser and the fwd message window. Not sure how hard that is to implement, but I'll also see if I can figure it out.
Hmm - I'll do some testing on this - thanks for the info!

- D2G
Reply
Member: ldostang
at: 01:28 PM 07/09/2009
thanks for this bro. nice and simple. now only if i had a nice and simple method to enable call duration.
Reply
Member: d2globalinc
at: 01:30 PM 07/09/2009
Originally Posted by ldostang:
thanks for this bro. nice and simple. now only if i had a nice and simple method to enable call duration.
Has this been done already? If not - what exactly do you want?

- D2G
Reply
Member: ldostang
at: 01:34 PM 07/09/2009
Originally Posted by d2globalinc:
Has this been done already? If not - what exactly do you want?

- D2G
i saw this on the wiki site, but i dont understand it much.

Originally Posted by :
Show call duration in the call log

Sprint always customizes their phones to conceal call duration information. This avoids angry phone calls from confused customers who are surprised when their 1:01 phone call results in 2:00 minutes charged to their account. I can sympathize. However, I won't call complain, and I occasionally want to know how long a call was after the fact.

There is a system preference phoneAppHideCallDuration which appears to control this, but it merely provides a default value. The phone app caches the value and saves it as a cookie. As an exercise, I'll show you how to set the preference as well.

To set the phoneAppHideCallDuration preference:

[user@linuxhost]$ ssh -p 222 palm-pre
user@castle:~$ su
root@castle:/home/user# luna-send -n 1 palm://com.palm.systemservice/setPreferences '{"phoneAppHideCallDuration": false}'
** Message: serviceResponse Handling: 2, { "returnValue": true }

Here we've used luna-send to broadcast a message requesting the systemservice to set a preference (I believe you can actually specify multiple preferences at once, the payload format is a json hashtable). Unfortunately, that only sets the default, so to actually see the change we need to update a cookie stored in the phone app. We'll do that now:

root@castle:/home/user# cd /var/palm/data/
root@castle:/var/palm/data# sqlite3 cookies.db
SQLite version 3.6.1
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> 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";
sqlite> .exit
root@castle:/var/palm/data# exit
user@castle:~$ exit
Connection to palm-pre closed.

This time we've used sqlite3 to update the cookies database directly. The primary key of the Cookies table (in the cookies database) is (domain_head, domain_tail, path, name), we specify the full key, and update the value. Note the value field is always percent-encoded and in this case represents the string "0" (including the quotes). To see your changes, reboot your phone. I've been doing this by holding the power key and turning it off, though presumably a shutdown -r would work as well (I have not tried it though).

Note: if you are typing in the sql by hand, take care you get it correct. If you make a typo and the where portion does not match any records you will not get any feedback. To verify that your update was successful run the following SQL after your issue the update: select * from Cookies where domain_tail = "app.phone"

Reply
Member: Bigchris
at: 02:41 PM 07/09/2009
WOW..... Thanks.. Works great..
Reply
Member: Leke
at: 02:45 PM 07/09/2009
This guy your on a roll, are you sure you don't work for Palm?
Reply
Member: Bigchris
at: 02:52 PM 07/09/2009
Originally Posted by Leke:
This guy your on a roll, are you sure you don't work for Palm?
I know, he's the reason I even ventured into Rooting my pre, lol...
Reply
Member: ldostang
at: 02:59 PM 07/09/2009
Originally Posted by Bigchris:
I know, he's the reason I even ventured into Rooting my pre, lol...
lol. same here
Reply
Member: d2globalinc
at: 04:48 PM 07/09/2009
Originally Posted by ldostang:
i saw this on the wiki site, but i dont understand it much.
BAM!

http://discussion.treocentral.com/we...-call-log.html


- D2G
Reply
Member: TMed_ATL
at: 09:01 PM 07/09/2009
THANK YOU SO MUCH! sorry i never do all caps i know its a forum no no but i have been waiting for palm to enable this already. I have to fwd text a minimum of 2 times a day for my job. This helps SO much. I just ROOTED today and got your add a page hack also. Mad props!
Reply
Member: cjmedina26
at: 01:18 AM 07/10/2009
ok i dont know what im doing wrong here, after i copy and paste it just says installation complete rebooting device...... installation complete rebooting device... then just goes back to the rootcastle with out rebooting the device. but if i hit enter broadcast last message shutting down then reboots my pre. but when i launch my message app (text) i tap the thread then a message but nothing happen.
does some one have a idea what im doing wrong
Reply
Member: jrdejavux
at: 01:45 AM 07/10/2009
works like a charm ! thanks a bunch
Reply
Member: jrdejavux
at: 02:13 AM 07/10/2009
how about making one for SMS count ?
Reply
Member: dsackr
at: 02:30 AM 07/10/2009
I don't really have a need to forward text - but I do sometimes need to cut and paste from a text - which Palm Pre can't do... until now! You rock dude!

Now I can 'fwd' my text to get the info I need in an editable field - which the Pre does allow me to copy and paste from... AWESOMENESS ENSUES!!!
Reply
Member: d2globalinc
at: 05:10 AM 07/10/2009
Originally Posted by cjmedina26:
ok i dont know what im doing wrong here, after i copy and paste it just says installation complete rebooting device...... installation complete rebooting device... then just goes back to the rootcastle with out rebooting the device. but if i hit enter broadcast last message shutting down then reboots my pre. but when i launch my message app (text) i tap the thread then a message but nothing happen.
does some one have a idea what im doing wrong
If your still having a problem with this, try doing the restore section above, then after that reboot, try the enable script again. I just updated this script so there is an additional comment "#" field at the end of the script, this will ensure that when you copy and paste from these forums, the reboot commands is entered with a new line after it and the device should reboot.. I started doing this comment technique with all my HOWTO scripts so that that reboot command gets called. The forum editor removes the blank / newline at the end, so this is the best way to make sure this happens!

- D2G
Reply
Member: 1lnxraider
at: 10:03 AM 07/10/2009
Now with message fwd'ing working... It would be great to be able to share Contacts via bluethooth, txt msg and/or email. Thanks for the info...
Reply
1 2 3 4 5 6 
webOS Nation Forums > webOS apps and software > webOS development > HOWTO - Enable text and e-mail message forwarding.