I'm trying to set the icon on the notification window and set the icon, however the icon doesn't work. I'm using the setIcon path below elsewhere (on a menuItem) and it works fine, but this code spits out an error. This is for a OSX desktop application.
try { var n = Titanium.Notification.createNotification(window); n.setTitle("Click to Call added"); n.setTimeout(5000); n.setIcon("applicationicon.png"); n.setMessage("The application Click to Call has been added into your Codenow repository"); n.show(); } catch(e) { alert(e); }
error
[02:30:27:509] [Titanium.JavaScript.KJSUtil] [Debug] Evaluating JavaScript file at: /Users/Me/Library/Application Support/Titanium/modules/osx/tiui/1.2.0.RC4/ui.js [02:30:27:521] [Titanium.UI.TitaniumProtocols] [Error] Error finding /Users/Me/Library/Application Support/Titanium/modules/osx/tiui/1.2.0.RC4/nullThe folder it's trying to look under doesn't even exist, while the image is in the resources folder of the project.
1 Answer
This works for me:
Titanium.Notification.createNotification({ icon: '/images/boxr_icon.png', message: 'Download finished!' }).show();
The root ("/") in the icon path is the Resources folder.
Your Answer
Think you can help? Login to answer this question!