http://wiki.webos-internals.org/index.php?title=Changes_Alert/Notification_Sounds&feed=atom&action=history
Changes Alert/Notification Sounds - Revision history
2024-03-28T14:18:17Z
Revision history for this page on the wiki
MediaWiki 1.35.1
http://wiki.webos-internals.org/index.php?title=Changes_Alert/Notification_Sounds&diff=4250&oldid=prev
Hopspitfire: fixing links
2009-08-12T04:11:49Z
<p>fixing links</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 04:11, 12 August 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l7" >Line 7:</td>
<td colspan="2" class="diff-lineno">Line 7:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Simple Method (Overwrite notification.wav)==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Simple Method (Overwrite notification.wav)==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>See [[<del class="diffchange diffchange-inline">Change_the_default_notification</del>.<del class="diffchange diffchange-inline">wav_Sound</del>| Change the default notification.wav Sound]].</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>See [[<ins class="diffchange diffchange-inline">Patch webOS Change the default notification</ins>.<ins class="diffchange diffchange-inline">wav Sound</ins>| Change the default notification.wav Sound]].</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== SSH/USB Method===</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== SSH/USB Method===</div></td></tr>
</table>
Hopspitfire
http://wiki.webos-internals.org/index.php?title=Changes_Alert/Notification_Sounds&diff=3676&oldid=prev
Hopspitfire at 08:55, 3 August 2009
2009-08-03T08:55:47Z
<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 08:55, 3 August 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{template:patch}}</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This page details a way of making the Pre use a pre-defined MP3 from the USB storage side as it's Alert and Notification tones. This is a work around until Palm adds the UI to be able to modify these settings from the GUI.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This page details a way of making the Pre use a pre-defined MP3 from the USB storage side as it's Alert and Notification tones. This is a work around until Palm adds the UI to be able to modify these settings from the GUI.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>
Hopspitfire
http://wiki.webos-internals.org/index.php?title=Changes_Alert/Notification_Sounds&diff=2809&oldid=prev
Hopspitfire: fixing link
2009-07-28T23:00:23Z
<p>fixing link</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:00, 28 July 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l6" >Line 6:</td>
<td colspan="2" class="diff-lineno">Line 6:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Simple Method (Overwrite notification.wav)==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Simple Method (Overwrite notification.wav)==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>See [[<del class="diffchange diffchange-inline">change-the-default-notification-wav-sound </del>| Change the default notification.wav Sound]].</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>See [[<ins class="diffchange diffchange-inline">Change_the_default_notification.wav_Sound</ins>| Change the default notification.wav Sound]].</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== SSH/USB Method===</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== SSH/USB Method===</div></td></tr>
</table>
Hopspitfire
http://wiki.webos-internals.org/index.php?title=Changes_Alert/Notification_Sounds&diff=1062&oldid=prev
Hopspitfire at 21:01, 20 July 2009
2009-07-20T21:01:41Z
<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 21:01, 20 July 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l3" >Line 3:</td>
<td colspan="2" class="diff-lineno">Line 3:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Currently all of these methods still keep the Notification Tone as the sound used for new email, text, and charger connect. Seperating these is on the way.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Currently all of these methods still keep the Notification Tone as the sound used for new email, text, and charger connect. Seperating these is on the way.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>You will need [[<del class="diffchange diffchange-inline">[rooting </del>| root shell access<del class="diffchange diffchange-inline">]</del>]] to perform these changes. Follow these instructions at your own risk. If you make an error (or perhaps even if you do it correctly) you risk bricking your phone, voiding your warranty, etc. These instructions assume a working knowledge of Unix/Linux command line. Also, note that these changes require rebooting the phone to take effect.</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>You will need [[<ins class="diffchange diffchange-inline">Portal:Accessing_Linux </ins>| root shell access]] to perform these changes. Follow these instructions at your own risk. If you make an error (or perhaps even if you do it correctly) you risk bricking your phone, voiding your warranty, etc. These instructions assume a working knowledge of Unix/Linux command line. Also, note that these changes require rebooting the phone to take effect.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Simple Method (Overwrite notification.wav)==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Simple Method (Overwrite notification.wav)==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>See <del class="diffchange diffchange-inline">[</del>[[change-the-default-notification-wav-sound | Change the default notification.wav Sound<del class="diffchange diffchange-inline">]</del>]].</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>See [[change-the-default-notification-wav-sound | Change the default notification.wav Sound]].</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== SSH/USB Method===</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== SSH/USB Method===</div></td></tr>
</table>
Hopspitfire
http://wiki.webos-internals.org/index.php?title=Changes_Alert/Notification_Sounds&diff=1059&oldid=prev
Hopspitfire: New page: This page details a way of making the Pre use a pre-defined MP3 from the USB storage side as it's Alert and Notification tones. This is a work around until Palm adds the UI to be able to ...
2009-07-20T21:00:56Z
<p>New page: This page details a way of making the Pre use a pre-defined MP3 from the USB storage side as it's Alert and Notification tones. This is a work around until Palm adds the UI to be able to ...</p>
<p><b>New page</b></p><div>This page details a way of making the Pre use a pre-defined MP3 from the USB storage side as it's Alert and Notification tones. This is a work around until Palm adds the UI to be able to modify these settings from the GUI.<br />
<br />
Currently all of these methods still keep the Notification Tone as the sound used for new email, text, and charger connect. Seperating these is on the way.<br />
<br />
You will need [[[rooting | root shell access]]] to perform these changes. Follow these instructions at your own risk. If you make an error (or perhaps even if you do it correctly) you risk bricking your phone, voiding your warranty, etc. These instructions assume a working knowledge of Unix/Linux command line. Also, note that these changes require rebooting the phone to take effect.<br />
<br />
== Simple Method (Overwrite notification.wav)==<br />
See [[[change-the-default-notification-wav-sound | Change the default notification.wav Sound]]].<br />
<br />
=== SSH/USB Method===<br />
<br />
Copy two MP3's of your choice to the USB storage side of the Pre called 'notifications.mp3' and 'alerts.mp3'. <br />
<br />
Warning: If you decide to put the mp3's into folders or use different names, you will need to modify the values in the sql 'update' statements below. Always escape the / path character like \/ as is shown in the code below. Failure to do so may result in inoperable notifications.<br />
<br />
<pre><nowiki><br />
ssh -p 222 username@palm-pre<br />
user@castle:~$ su -<br />
root@castle:/home/root# cd /var/luna/preferences<br />
root@castle:/var/luna/preferences# cp systemprefs.db systemprefs.db.bak<br />
root@castle:/var/luna/preferences# sqlite3 systemprefs.db<br />
sqlite> update Preferences set value='{ "fullPath": "\/media\/internal\/notifications.mp3", "name": "notifications.mp3" }' where key='notificationtone';<br />
sqlite> update Preferences set value='{ "fullPath": "\/media\/internal\/alerts.mp3", "name": "alerts.mp3" }' where key='alerttone';<br />
sqlite> .quit<br />
root@castle:/var/luna/preferences# reboot<br />
</nowiki></pre><br />
<br />
Once the Pre reboots, you should be able to hear your MP3s for Notifications and Alerts!<br />
<br />
If you wish to change your tones, simply overwrite the MP3s as you desire.<br />
<br />
Enjoy!<br />
LK<br />
<br />
'''Question:''' Would putting these in a hidden folder prevent them showing up in the music player application? ~ natrixgli (steviebuns in IRC)<br />
<br />
To hide the files, place a '.' in front of their names. To make changes later, you will need to enable hidden file view from your respective client.<br />
<br />
The next two lines of code worked for me. ~ PreNomadBrad<br />
<pre><nowiki><br />
update Preferences set value='{ "fullPath": "\/media\/internal\/.notifications.mp3", "name": "notifications.mp3" }' where key='notificationtone';<br />
update Preferences set value='{ "fullPath": "\/media\/internal\/.alerts.mp3", "name": "alerts.mp3" }' where key='alerttone';<br />
</nowiki></pre><br />
<br />
= Sounds and Alerts Program Modification=<br />
'''Disclaimer:''' This is very involved and needs to be cleaned up. Use this method at your own risk until the code has been verified by others.<br />
'''Update:''' This process has been verified by linuxkidd.<br />
<br />
This method involves editing three files in the com.palm.app.soundsandalerts directory. I am sure there are better ways to do this, however I have limited experience and did the best I could.<br />
<br />
* This mod has been turned into a stand alone application as well. Once it gets packaged up the link will be posted on precentral and this site. - Kaerey<br />
<br />
== Step One: Modify the Sounds and Alerts Program to add the new fields.==<br />
File needed: /usr/palm/applications/com.palm.app.soundsandalerts/app/views/soundsalertsconfig/soundsalertsconfig-scene.html<br />
<br />
Between lines 50 and 51, add:<br />
<pre><nowiki><br />
<div id='currentalertrow' class="palm-row" x-mojo-tap-highlight="momentary"><br />
<div class="palm-row-wrapper"><br />
<div class="label" x-mojo-loc=''>Alert</div><br />
<div id='currentalert' class="title"></div> <br />
</div><br />
</div><br />
<div id='currentnotificationrow' class="palm-row" x-mojo-tap-highlight="momentary"><br />
<div class="palm-row-wrapper"><br />
<div class="label" x-mojo-loc=''>Notification</div><br />
<div id='currentnotification' class="title"></div> <br />
</div><br />
</div><br />
</nowiki></pre><br />
<br />
== Step 2:==<br />
File needed: /usr/palm/applications/com.palm.app.soundsandalerts/app/models/SystemService.js<br />
<br />
Find the Section of Code that deals with getRingtone and setRingtone starting on line 9:<br />
<pre><nowiki><br />
SystemService.setRingtone = function(value,callback) {<br />
<br />
var request = new Mojo.Service.Request(SystemService.identifier, {<br />
method: 'setPreferences',<br />
parameters: {"ringtone":value}, <br />
});<br />
return request;<br />
}<br />
<br />
SystemService.getRingtone = function(callback) {<br />
<br />
var request = new Mojo.Service.Request(SystemService.identifier, {<br />
method: 'getPreferences',<br />
parameters: {"keys":["ringtone"],"subscribe":true}, <br />
onSuccess: callback,<br />
onFailure: callback<br />
});<br />
return request;<br />
}<br />
</nowiki></pre><br />
<br />
We are going to create this section for Alerts and Notifications:<br />
<br />
<pre><nowiki><br />
SystemService.getAlerts = function(callback) {<br />
var request = new Mojo.Service.Request(SystemService.identifier, {<br />
method: 'getPreferences',<br />
parameters: {"keys":["alerttone"]}, <br />
onSuccess: callback,<br />
onFailure: callback<br />
});<br />
return request;<br />
}<br />
<br />
SystemService.setAlerts = function(value){<br />
var request = new Mojo.Service.Request(SystemService.identifier, {<br />
method: 'setPreferences',<br />
parameters: {"alerttone":value}, <br />
});<br />
return request;<br />
}<br />
<br />
</nowiki></pre><br />
<br />
<pre><nowiki><br />
SystemService.getNotifications = function(callback) {<br />
var request = new Mojo.Service.Request(SystemService.identifier, {<br />
method: 'getPreferences',<br />
parameters: {"keys":["notificationtone"]}, <br />
onSuccess: callback,<br />
onFailure: callback<br />
});<br />
return request;<br />
}<br />
<br />
SystemService.setNotifications = function(value){<br />
var request = new Mojo.Service.Request(SystemService.identifier, {<br />
method: 'setPreferences',<br />
parameters: {"notificationtone":value}, <br />
});<br />
return request;<br />
}<br />
</nowiki></pre><br />
<br />
== Step 3:==<br />
File needed: /usr/palm/applications/com.palm.app.soundsandalerts/app/controllers/soundsalertsconfig-assistant.js<br />
<br />
We will be creating handlers for Alerts and Notifications and Editing the handler for Ringtone in order to accomdate the new components.<br />
<br />
At Line 81 you will see:<br />
<pre><nowiki><br />
$('currentringtonerow').observe(Mojo.Event.tap, this.showAudioFilePicker.bindAsEventListener(this));<br />
</nowiki></pre><br />
Notice that there is an extra line break where something may have been previously removed.<br />
<br />
We need to create entries for Alert and Notification:<br />
<pre><nowiki><br />
$('currentalertrow').observe(Mojo.Event.tap, this.showAlertFilePicker.bindAsEventListener(this));<br />
$('currentnotificationrow').observe(Mojo.Event.tap, this.showNotificationFilePicker.bindAsEventListener(this));<br />
</nowiki></pre><br />
<br />
Below that section you will see at line 84:<br />
<pre><nowiki><br />
this.getCurrentVolumes();<br />
this.getCurrentRingtone();<br />
this.getVibrateSettings(); <br />
this.getOtherSettings();<br />
</nowiki></pre><br />
<br />
Add entries for Alerts and Notifications:<br />
<pre><nowiki><br />
this.getCurrentAlert();<br />
this.getCurrentNotification();<br />
</nowiki></pre><br />
<br />
In the final step we need to create the handlers and edit the ringtone handlers.<br />
<br />
Find the Code near line 215:<br />
<pre><nowiki><br />
getCurrentRingtone: function() {<br />
this.getCurrentRingtoneReq = SystemService.getRingtone(this.getCurrentRingtoneQuery.bind(this));<br />
},<br />
<br />
getCurrentRingtoneQuery: function(payload) { <br />
if (payload.ringtone) {<br />
$('currentringtone').innerHTML = payload.ringtone.name;<br />
this.currRingtonePath = payload.ringtone.fullPath; <br />
}<br />
else <br />
$('currentringtone').innerHTML = $L("Pick a ringtone");<br />
<br />
},<br />
<br />
showAudioFilePicker: function(event) {<br />
var params = {"kinds": ["ringtone"],"filePath":this.currRingtonePath,"onSelect":this.selectedAudioFile.bind(this),actionType:"attach",actionName: $L("Done")};<br />
Mojo.FilePicker.pickFile(params,Mojo.Controller.stageController);<br />
},<br />
<br />
selectedAudioFile: function(file) { <br />
//var params = {"fullPath": encodeURIComponent(file.fullPath), "name":file.name};<br />
this.setRingtoneReq = SystemService.setRingtone(file);<br />
$('currentringtone').innerHTML = file.name;<br />
},<br />
</nowiki></pre><br />
<br />
After this code, for Alerts add:<br />
<pre><nowiki><br />
// Alert Picking<br />
getCurrentAlert: function() {<br />
this.getCurrentAlertReq = SystemService.getAlerts(this.getCurrentAlertQuery.bind(this));<br />
},<br />
<br />
getCurrentAlertQuery: function(payload) { <br />
if (payload.alerttone) {<br />
$('currentalert').innerHTML = payload.alerttone.name;<br />
this.currAlertPath = payload.alerttone.fullPath; <br />
}<br />
else <br />
$('currentalert').innerHTML = $L("Pick an alert");<br />
<br />
},<br />
<br />
showAlertFilePicker: function(event) {<br />
var params = {"kinds": ["ringtone"],"filePath":this.currAlertPath,"onSelect":this.selectedAlertFile.bind(this),actionType:"attach",actionName: $L("Done")};<br />
Mojo.FilePicker.pickFile(params,Mojo.Controller.stageController);<br />
},<br />
<br />
selectedAlertFile: function(file) { <br />
//var params = {"fullPath": encodeURIComponent(file.fullPath), "name":file.name};<br />
this.setAlertReq = SystemService.setAlerts(file);<br />
$('currentalert').innerHTML = file.name;<br />
},<br />
</nowiki></pre><br />
<br />
And for Notifications add:<br />
<pre><nowiki><br />
// Notification Picking<br />
getCurrentNotification: function() {<br />
this.getCurrentNotificationReq = SystemService.getNotifications(this.getCurrentNotificationQuery.bind(this));<br />
},<br />
<br />
getCurrentNotificationQuery: function(payload) { <br />
if (payload.notificationtone) {<br />
$('currentnotification').innerHTML = payload.notificationtone.name;<br />
this.currNotificationPath = payload.notificationtone.fullPath; <br />
}<br />
else <br />
$('currentnotification').innerHTML = $L("Pick a notification");<br />
<br />
},<br />
<br />
showNotificationFilePicker: function(event) {<br />
var params = {"kinds": ["ringtone"],"filePath":this.currNotificationPath,"onSelect":this.selectedNotificationFile.bind(this),actionType:"attach",actionName: $L("Done")};<br />
Mojo.FilePicker.pickFile(params,Mojo.Controller.stageController);<br />
},<br />
<br />
selectedNotificationFile: function(file) { <br />
//var params = {"fullPath": encodeURIComponent(file.fullPath), "name":file.name};<br />
this.setNotificationReq = SystemService.setNotifications(file);<br />
$('currentnotification').innerHTML = file.name;<br />
},<br />
</nowiki></pre><br />
<br />
Copy your desired notification sounds to the "ringtones" directory in /media/internal/ringtones and they will be visable in the FilePicker.<br />
<br />
Save all the files, upload them to the correct locations on the device, and reboot!<br />
<br />
= Add a Separate Sound for Messages=<br />
Check out the [[message-sound]] mod to specify the sound played on an incoming message, distinct from the alert and notification sounds.<br />
<br />
= Copy original notification.wav to ringtones folder=<br />
<pre><nowiki><br />
cp /usr/palm/sounds/notification.wav /media/internal/ringtones<br />
</nowiki></pre><br />
<br />
= Credits=<br />
Submitted by Kaerey</div>
Hopspitfire