android - how to open specific window after clicking on notification in titanium -


i want open page in app when click on notification in titanium i'm using titanium sdk 3.5.1 have created intent lanch app open index page

var intent1 = ti.android.createintent({     flags : ti.android.flag_activity_reset_task_if_needed | ti.android.flag_activity_single_top,     classname : 'co.ntime.audioplayer.audioplayeractivity',     action : ti.android.action_main }); var pending1 = ti.android.creatependingintent({     activity : ti.android.currentactivity,     intent : intent1,     type : ti.android.pending_intent_for_activity,     flags : titanium.android.flag_activity_new_task }); ti.android.currentactivity.addeventlistener('newintent', function(e) {     ti.api.info('caught intent!');     var page1 = alloy.createcontroller('page1').getview();     $.index.add(page1); }); 

but doesn't enter new intent event

you can try

notificationmanager nm = (notificationmanager)getsystemservice(notification_service); notification notif = new notification(com.project.r.drawable.app_icon, "heading title", system.currenttimemillis()); charsequence = "application name"; charsequence message = "message want show";  intent = new intent(myactivity.this,showactivity.class); intent.putextra("notifid", notifid);  pendingintent= pendingintent.getactivity(myactivity.this, notifid, intent,     pendingintent.flag_update_current| pendingintent.flag_one_shot);  notif.setlatesteventinfo(this, from, message, intent); notif.flags |= notification.flag_auto_cancel; notif.vibrate = new long[] { 100, 250, 100, 500 }; nm.notify(notifid, notif); finish(); 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -