언어 설정

Menu
Sites
Language
Not displaying the Notification icon image

When trying to show notification without passing the 'iconPath' paramater, the notification is not displaying default application image.

 

 

try {
      var notificationDict = {
                  content : "This is a simple notificaiton.",
                  soundPath : "music/Over the horizon.mp3",
                  vibration : true
      };

      var notification = new tizen.StatusNotification("SIMPLE",
                  "Simple notification", notificationDict);
 } catch (err) {
      console.log (err.name + ": " + err.message);
 }

 

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

13 댓글
Lakshmi Grandhi
Hii , I have raised a bug for this issue , https://bugs.tizen.org/jira/browse/TWEB-135
anfas ci
Meanwhile, can you let me know how to refer image embedded in the application as notification icon? var notificationDict = { content : "This is a simple notificaiton.", iconPath : "images/image1.jpg", soundPath : "music/Over the horizon.mp3", vibration : true }; This will refer to the image in the system storage. But I'd like to use the image from the application resource itself.
Lakshmi Grandhi
Try this code snippet var notificationDict = { content : "Screen will become bright", iconPath : "/opt/media/Images/image1.jpg", vibration : true, };
anfas ci
For an example, consider below as my app folder structure: /css /js /src /res /index.html /config.xml And the image is in the path /res/sample.jpg within the app. Then how to set it as notification icon?
Lakshmi Grandhi
It is not possible to fetch image in that way . If you want to show notification with default application image then give this in the iconPath -/opt/apps/.backup/icons/
Lakshmi Grandhi
It is not possible to fetch image in that way . If you want to show notification with default application image then give this in the iconPath -/opt/apps/<your application Id>.backup/icons/<application icon image name>
anfas ci
This path is not working if the application is installed for the first time. The folder '/opt/apps/.backup/' is not getting created at the time of first installation.
Lakshmi Grandhi
For example : iconPath : "/opt/apps/wDLdtQ3DNX.backup/icons/wDLdtQ3DNX.Notification.png" . Here "wDLdtQ3DNX" is my app Id and "Notification" is my app name
anfas ci
Ok that works. Thanks
Lakshmi Grandhi
This one is the better approach var currentApp = tizen.application.getCurrentApplication(); var iconPath=currentApp.appInfo.iconPath; var notificationDict = { content : "This is a simple notificaiton.", iconPath : iconPath, soundPath : "music/Over the horizon.mp3", vibration : true };
anfas ci
When I tried to use this path, the notification icon is not displaying. var iconPath=currentApp.appInfo.iconPath; // Returning path: /opt/share/icons/default/small/.png
anfas ci
I'm using Tizen SDK version 2.1
Lakshmi Grandhi
Hi anafas, I raised bug for https://bugs.tizen.org/jira/browse/TWEB-135