tags:

views:

38

answers:

0

Hi all,

I`am trying to launch an Intent filter from one proccess to run an activity of another proccess. this is pretty easy:

    protected void startIntent()
    {
       Intent i = new Intent(target);
       i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
       i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
       context.startActivity(i);
     }

now as my topic says, i am willing to run the target activity as a multiply instances.

each instance of that activity suppose to do some operation and then it has finish();

so now i call startIntent(); 4 times in a **row).

i wanna have 4 instances parallel in the stack of the same target activity.

(each activity will finish after it does some operations. with finish(); )

the problem is that it doesnt work properly. i tried some LoadTest, and when i call the method 3 (or below) times in a row it works fine,

but when I call startIntent() 4+ times some instances of that activity never get launched(for example the second Intent in the order that has been called)..(wierd isnt it?)

this is some warning I get:

WARN/ActivityManager(966): Duplicate finish request for HistoryRecord{4367ed60 {com.test.targetActivity/com.idan.external.callingActivity}}

btw: in the target activity ive setted in the manifest the flag: android:launchMode="standard" (also tried without it, and it didnt work).

any idea?

realy thanks,

moshik.