webOS Nation Forums >  webOS apps and software >  webOS development > HOWTO - Enable text and e-mail message forwarding.
HOWTO - Enable text and e-mail message forwarding.

  Reply
 
LinkBack Thread Tools Display Modes
Old 07/09/2009, 10:55 AM   #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 text and e-mail message forwarding.

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

Last edited by d2globalinc; 08/27/2009 at 09:07 PM.
d2globalinc is offline   Reply With Quote
Old 07/09/2009, 11:09 AM   #2 (permalink)
Member
 
Join Date: Feb 2007
Posts: 159
Likes Received: 0
Thanks: 19
Thanked 4 Times in 3 Posts
Default

Holy *** Been wanting this! PALLLLLLLLLLM, HIRE THIS GUY!

Last edited by Milominderbinder; 07/22/2009 at 01:43 PM. Reason: moderator deletion
though is offline   Reply With Quote
Old 07/09/2009, 11:49 AM   #3 (permalink)
Member
 
DNic's Avatar
 
Join Date: Jun 2009
Posts: 599
Likes Received: 0
Thanks: 174
Thanked 44 Times in 34 Posts
Default

Nice! Really need a How-to sub forum.
DNic is offline   Reply With Quote
Thanked By: Syphon
Old 07/09/2009, 11:51 AM   #4 (permalink)
Member
 
Join Date: Jun 2009
Location: Minneapolis, MN
Posts: 58
Likes Received: 0
Thanks: 6
Thanked 7 Times in 6 Posts
Default

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.
Kimleng is offline   Reply With Quote
Old 07/09/2009, 12:19 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 Kimleng View Post
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
d2globalinc is offline   Reply With Quote
Old 07/09/2009, 12:28 PM   #6 (permalink)
Member
 
Join Date: Jun 2009
Posts: 26
Likes Received: 0
Thanks: 4
Thanked 3 Times in 1 Post
Default

thanks for this bro. nice and simple. now only if i had a nice and simple method to enable call duration.
ldostang is offline   Reply With Quote
Old 07/09/2009, 12:30 PM   #7 (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 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
d2globalinc is offline   Reply With Quote
Old 07/09/2009, 12:34 PM   #8 (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
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.

Quote:
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"
ldostang is offline   Reply With Quote
Old 07/09/2009, 01:41 PM   #9 (permalink)
Member
 
Bigchris's Avatar
 
Join Date: Jan 2005
Location: Southern California
Posts: 644
Likes Received: 0
Thanks: 126
Thanked 43 Times in 22 Posts
Default

WOW..... Thanks.. Works great..
__________________
Remember, this is my opinion ! We all have a right to our own.....

Treo's 650-800..NOW,
Palm Pre
Bigchris is offline   Reply With Quote
Old 07/09/2009, 01:45 PM   #10 (permalink)
Member
 
Leke's Avatar
 
Join Date: Jan 2007
Posts: 602
Likes Received: 0
Thanks: 8
Thanked 59 Times in 36 Posts
Default

This guy your on a roll, are you sure you don't work for Palm?
Leke is offline   Reply With Quote
Old 07/09/2009, 01:52 PM   #11 (permalink)
Member
 
Bigchris's Avatar
 
Join Date: Jan 2005
Location: Southern California
Posts: 644
Likes Received: 0
Thanks: 126
Thanked 43 Times in 22 Posts
Default

Quote:
Originally Posted by Leke View Post
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...
__________________
Remember, this is my opinion ! We all have a right to our own.....

Treo's 650-800..NOW,
Palm Pre
Bigchris is offline   Reply With Quote
Old 07/09/2009, 01:59 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 Bigchris View Post
I know, he's the reason I even ventured into Rooting my pre, lol...
lol. same here
ldostang is offline   Reply With Quote
Old 07/09/2009, 03:48 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
i saw this on the wiki site, but i dont understand it much.
BAM!

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


- D2G
d2globalinc is offline   Reply With Quote
Old 07/09/2009, 08:01 PM   #14 (permalink)
Member
 
TMed_ATL's Avatar
 
Join Date: May 2009
Location: ATL/ Athens, GA
Posts: 413
Likes Received: 0
Thanks: 61
Thanked 27 Times in 24 Posts
Default

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!
__________________
SCK Manager
TMed_ATL is offline   Reply With Quote
Old 07/10/2009, 12:18 AM   #15 (permalink)
Member
 
cjmedina26's Avatar
 
Join Date: Aug 2007
Posts: 193
Likes Received: 2
Thanks: 6
Thanked 11 Times in 6 Posts
Default

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
__________________

using my acer aspire tethered to my palm pre
cjmedina26 is offline   Reply With Quote
Old 07/10/2009, 12:45 AM   #16 (permalink)
Member
 
Join Date: Jun 2009
Location: San Diego
Posts: 199
Likes Received: 0
Thanks: 46
Thanked 20 Times in 20 Posts
Default

works like a charm ! thanks a bunch
__________________
jrdejavux is offline   Reply With Quote
Old 07/10/2009, 01:13 AM   #17 (permalink)
Member
 
Join Date: Jun 2009
Location: San Diego
Posts: 199
Likes Received: 0
Thanks: 46
Thanked 20 Times in 20 Posts
Default

how about making one for SMS count ?
__________________
jrdejavux is offline   Reply With Quote
Old 07/10/2009, 01:30 AM   #18 (permalink)
Member
 
Join Date: Jun 2009
Posts: 49
Likes Received: 0
Thanks: 1
Thanked 2 Times in 2 Posts
Default

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!!!
dsackr is offline   Reply With Quote
Old 07/10/2009, 04:10 AM   #19 (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 cjmedina26 View Post
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
d2globalinc is offline   Reply With Quote
Old 07/10/2009, 09:03 AM   #20 (permalink)
Member
 
Join Date: Jun 2009
Location: Washington, DC
Posts: 44
Likes Received: 0
Thanks: 9
Thanked 9 Times in 7 Posts
Default

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...
1lnxraider is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0