Notification ressources

Notification ressources

BY 02 Mar 2015 Web Application Development

Hello,

I am testing a notification example, within my code, I add a sound + an image to y notification:

var notificationDict = {
                      content : "This is a simple notification.",
	                  iconPath : "./images/icon5.png",
	                  soundPath : "/opt/usr/media/music.mp3", 
	                  vibration : true, 
	                  appControl : appControl};

 

The problem is that I must:

1- insert the sound in the local folders of the emulator manually (as shown in the path), and I would like to know how to do it with the code.

2- Same thing with the iconPath, I created an “images” folder into my project, in which I insert “icon5.png” and I have specified my image path in the iconPath attribute, but the icon didn’t show up!

How to solve this issue?

Thank you

Written by