I solved my own issue... I was setting some flags on my intent: Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK;
But when using the FLAG_ACTIVITY_NO_HISTORY, my activity that is launched is not kept in the activity-stack, meaning when I start from that 'invisible' activity another activity 'for-result' I can never com back in the onActivityResult because it doesn't know where to go... So my activity gets killed and nothing happens. If run my original code without the flag FLAG_ACTIVITY_NO_HISTORY it works perfect... Thanks for the help anyway (and sorry for my mistake ;) ) and happy coding! :) Kr Dirk Op woensdag 18 juli 2012 09:25:14 UTC+2 schreef Dirk Vranckaert het volgende: > > And also.. If I do not use FLAG_UPDATE_CURRENT, then what flag(s) should I > define? > > Op woensdag 18 juli 2012 09:23:57 UTC+2 schreef Dirk Vranckaert het > volgende: >> >> It always worked find to just pass the extras (in fact it's not only the >> widget ID that i'm passing, there is some other stuff in there to..). It >> since the launced activity starts another activity for result it doesn't >> work anymore... So I guess using the extras or the data element won't make >> a difference. I even tried to launch the activity without passing anything >> and still my onActivityResult method is not reached... >> >> So what I currently do is nothing more than this (so without any extras): >> Intent intent = new Intent(ctx, activity); >> PendingIntent pendingIntent = PendingIntent.getActivity(ctx, >> widgetId, intent, PendingIntent.FLAG_UPDATE_CURRENT); >> >> So then what do you mean with create different actions? >> >> Do you mean to create different pendingIntents (so with a different >> requestCode, something like "start" + widgetId and "stop" + widgetId) or do >> you mean to create two different activities (cause that is whay I already >> have, a start- and stop-activity)? >> >> Op woensdag 18 juli 2012 09:14:21 UTC+2 schreef TreKing het volgende: >>> >>> On Wed, Jul 18, 2012 at 2:13 AM, TreKing <treking...@gmail.com> wrote: >>> >>>> This makes each PendingIntent unique and they wrote overwrite each other >>> >>> >>> This makes each PendingIntent unique and they *won't* overwrite each >>> other. >>> >>> >>> ------------------------------------------------------------------------------------------------- >>> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago >>> transit tracking app for Android-powered devices >>> >>> -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en