How can I open the .js when click on the notification
I used this code but it does not work , Any Idea
var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_MAIN,
url: 'test.js'
});
intent.addCategory(Ti.Android.CATEGORY_LAUNCHER);
Titanium.Android.NotificationManager.notify(1, Titanium.Android.createNotification({
contentTitle:'test',
contentText : 'test app',
contentIntent: Ti.Android.createPendingIntent({
intent:intent,
type : Ti.Android.PENDING_INTENT_FOR_ACTIVITY
}),
flags : Titanium.Android.ACTION_DEFAULT | Titanium.Android.FLAG_AUTO_CANCEL | Titanium.Android.FLAG_SHOW_LIGHTS
}));
Thanks.
↧