Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

how to open specific window after clicking on notification

$
0
0

i want to open a certain page in the app when i click on notification in titanium i'm using titanium SDK 3.5.1 i have created an intent that lanch the app but it open the 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 it doesn't enter the new intent event

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>