<div dir="ltr">Well, for Android I know we can define programmatically  how the app behaves when the notification arrives to the notification tray. For iPhone I don&#39;t know, but I read this (among other things):<div><br>
</div><div>







<p class="">&quot;I just figured out one way to do this [vibrate without sound]: if you want to phone to <i>only</i> vibrate on receipt of a push notification, you need to have a silent sound file in your application bundle, for example &quot;silence.aif&quot; ... if you specify that sound file in the APS notification, the iOS device will &quot;play&quot; the silence.aif from your application bundle, but since the sound is silence, there is nothing to hear. However the notification vibration is still triggered&quot;<br>
<br>And also this about push notifications on Facebook:<br><br><span style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">For any of you&#39;s who have been frustrated with no sounds for notifications on Facebook, and to those who despises them!</span><br style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">
<br style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)"><span style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">There is now a fix for both worlds..Yes Facebook finally fixed their facebook notification sounds on iPhone. This post is for the people who enjoy getting facebook notifications, like me!</span><br style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">
<br style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)"><span style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">-Go to the facebook app on phone</span><br style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">
<span style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">-Go to Account Settings</span><br style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">
<span style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">-Go to Notifications</span><br style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">
<span style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">-Go to Mobile Push</span><br style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">
<span style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">-Look at the top of the screen, go to where it says &quot;Sound for push notifications&quot;</span><br style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">
<span style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">-Edit it to ON for all notifications</span><br style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">
<br style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)"><span style="color:rgb(0,0,0);font-family:verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif;font-size:13px;background-color:rgb(250,250,250)">Enjoy guys. And for those who don&#39;t want sound than don&#39;t edit this and leave at default!!</span><br>
</p></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 20, 2014 at 7:37 AM, Erik Jan de Wit <span dir="ltr">&lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>There is nothing we can do about that, when the notification arrives the phone will vibrate in accordance with the user preferences. iPhone Settings &gt; Sound - Android Settings &gt; Device &gt; Sound &gt; Default notification</div>
<div><br></div><div>Cheers,</div><div><span style="white-space:pre-wrap">        </span>Erik Jan</div><div><div class="h5"><br><div><div>On 19 Mar,2014, at 22:45 , Miguel Lemos &lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@gmail.com</a>&gt; wrote:</div>
<br><blockquote type="cite"><div dir="ltr">In Android the notification triggers the sound, vibrate, etc. But indeed the problem is that this should happen (or not...), as I said, when it arrives at the notification tray.</div>
<div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Mar 19, 2014 at 5:59 PM, Miguel Lemos <span dir="ltr">&lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">* not after I pressed...</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 19, 2014 at 5:58 PM, Miguel Lemos <span dir="ltr">&lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes, the sounds can be defined by the app.<div><br></div><div>&gt; In the iOS case (with Cordova) the only way to make the sound play that I know is to put the file in the project&#39;s root and pointing to it. I tested and it works. Not that i use it very much, but sometimes it&#39;s needed...<br>



<br>&gt; The function you use to play a sound along with the notification is:<br><br><span style="line-height:15.680000305175781px;font-size:11px;background-color:rgb(240,240,240);white-space:pre-wrap;font-family:monospace,serif;font-weight:bold">if</span><span style="line-height:15.680000305175781px;font-size:11px;background-color:rgb(240,240,240);white-space:pre-wrap;font-family:monospace,serif"> (e.sound) {</span><span style="line-height:15.680000305175781px;font-size:11px;background-color:rgb(240,240,240);white-space:pre-wrap;font-family:monospace,serif">
      </span><span style="line-height:15.680000305175781px;font-size:11px;background-color:rgb(240,240,240);white-space:pre-wrap;font-family:monospace,serif;font-weight:bold">var</span><span style="line-height:15.680000305175781px;font-size:11px;background-color:rgb(240,240,240);white-space:pre-wrap;font-family:monospace,serif"> media = </span><span style="line-height:15.680000305175781px;font-size:11px;background-color:rgb(240,240,240);white-space:pre-wrap;font-family:monospace,serif;font-weight:bold">new</span><span style="line-height:15.680000305175781px;font-size:11px;background-color:rgb(240,240,240);white-space:pre-wrap;font-family:monospace,serif"> Media(</span><span style="color:rgb(136,0,0);font-family:monospace,serif;font-size:11px;line-height:15.680000305175781px;white-space:pre-wrap;background-color:rgb(240,240,240)">&quot;/android_asset/www/&quot;</span><span style="line-height:15.680000305175781px;font-size:11px;background-color:rgb(240,240,240);white-space:pre-wrap;font-family:monospace,serif"> + e.sound);
      media.play();
    }</span><br></div><div><span style="line-height:15.680000305175781px;font-size:11px;background-color:rgb(240,240,240);white-space:pre-wrap;font-family:monospace,serif"><br></span></div><div>I didn&#39;t manage to make it work. Anyway I think it would be more &quot;normal&quot; a function like the one I sent. But, as I told before, the vibration and / or sound play only makes sense when the notification arrives in the notification area, not before I pressed on it. <br>



<br>Mind for instance a geofenced notification:the user must see it at the moment it arrives, and not 30 minutes later. In this case the vibration or sound are very important.</div></div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Mar 19, 2014 at 5:44 PM, Burr Sutter <span dir="ltr">&lt;<a href="mailto:bsutter@redhat.com" target="_blank">bsutter@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">Are there no &quot;out-of-the-box&quot; sounds for Android?<div><br></div><div>I thought the iOS sounds were not driven by the indiviual app.</div><div><div><br></div><div>
<br><div><div>On Mar 19, 2014, at 1:40 PM, Sebastien Blanc &lt;<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>&gt; wrote:</div><br><blockquote type="cite"><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">



<div class="gmail_extra"><br><br><br><div class="gmail_quote">On Wed, Mar 19, 2014 at 5:50 PM, Miguel Lemos<span> </span><span dir="ltr">&lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@gmail.com</a>&gt;</span><span> </span>wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi<div><br></div><div>The sound event when the notification arrives doesn&#39;t seem to work (at least on iPhone; Android not tested yet).</div>



<div><br></div><div>And yes: the sound plugin is installed and working just fine.</div><div><br></div><div>Besides, I don&#39;t understand quite well the way you build the event. Example given by you for Android:</div><div>



<br></div><div><span style="line-height:15.680000305175781px;font-size:11px;white-space:pre-wrap;font-family:monospace,serif;font-weight:bold">var</span><span style="line-height:15.680000305175781px;font-size:11px;background-color:rgb(240,240,240);white-space:pre-wrap;font-family:monospace,serif"> my_media = </span><span style="line-height:15.680000305175781px;font-size:11px;white-space:pre-wrap;font-family:monospace,serif;font-weight:bold">new</span><span style="line-height:15.680000305175781px;font-size:11px;background-color:rgb(240,240,240);white-space:pre-wrap;font-family:monospace,serif"> Media(</span><span style="color:rgb(136,0,0);font-family:monospace,serif;font-size:11px;line-height:15.680000305175781px;white-space:pre-wrap">&quot;/android_asset/www/&quot;</span><span style="line-height:15.680000305175781px;font-size:11px;background-color:rgb(240,240,240);white-space:pre-wrap;font-family:monospace,serif"> + e.sound);</span><br>



</div><div><br></div><div>..What sound? I can have several sounds on a given folder...</div></div></blockquote><div>I haven&#39;t play too much with sound but e.sound is supposed to contain the filename of your sound file (like beep.wav / sirene.wav ...)  </div>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>I think a better - and more trivial - approach would be something like this (just an opinion...):<br>



<br><div>if (e.sound) {</div><div><span style="white-space:pre-wrap">                </span>if (device.platform == &quot;Android&quot;) {</div><div><span style="white-space:pre-wrap">                        </span>media = new Media(&quot;/android_asset/www/beep.wav&quot;);</div>



<div><span style="white-space:pre-wrap">                        </span>} else if (device.platform == &quot;iOS&quot;) {</div><div><span style="white-space:pre-wrap">                        </span>media = new Media(&quot;beep.wav&quot;); // root directory</div><div>



<span style="white-space:pre-wrap">                        </span>} </div><div><span style="white-space:pre-wrap">                </span>media.play();    </div><div>         <span> </span>}</div></div><div><br></div><div><br></div><div>Thanks guys :-)</div>



</div><br>_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>



</blockquote></div><br></div></div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">_______________________________________________</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">



<span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">aerogear-dev mailing list</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">



<a href="mailto:aerogear-dev@lists.jboss.org" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">aerogear-dev@lists.jboss.org</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">



<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote>



</div><br></div></div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>
</div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote>
</div><br></div></div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>