On receiving push notification - Its defaults showing by module but its only shows message and streched application icon.
I need to customise the notification - How it possible ?
Now in my below code showing push notification two times...
var win = Ti.UI.createWindow({ layout: 'vertical', backgroundColor: 'white' }); var CloudPush = require('ti.cloudpush'); var Cloud = require("ti.cloud"); CloudPush.addEventListener('callback', function (evt) { var message = evt.payload; alert( 'Push notification : '+ evt.payload); var ntfId = 1; var launcherIntent = Ti.Android.createIntent({ className: 'com.MobiSam.MobiSamActivity', action: 'action' + ntfId, // we need an action identifier to be able to track click on notifications packageName: Ti.App.id, flags: Ti.Android.FLAG_ACTIVITY_NEW_TASK | Ti.Android.FLAG_ACTIVITY_SINGLE_TOP }); launcherIntent.addCategory(Ti.Android.CATEGORY_LAUNCHER); launcherIntent.putExtra("ntfId", ntfId); var pintent = Ti.Android.createPendingIntent({ intent: launcherIntent }); var notification = Ti.Android.createNotification({ contentIntent: pintent, contentTitle: message, contentText: message, tickerText: message, icon: Ti.App.Android.R.drawable.appicon, flags: Ti.Android.FLAG_AUTO_CANCEL | Ti.Android.FLAG_SHOW_LIGHTS }); Ti.Android.NotificationManager.notify(ntfId, notification); });