When I try to do like following code:
public class A_activity extends activity {
.........
Intent B = new Intent(this, B_activity.class);
startActivity(B);// B_activity is a progress animation
......
sendBroadcast();// use to finish B_activity
Intent C = new Intent(this, C_activity.class);
startActivity(C);// C_activity is which should be start after B_activity
.........
}
It directly jumps into C_activity, but no B_activity. After I finish C_activity, B_activity startup. It's confusing to me, how can I clear the B_activity when I jump into C_activity, or make sure the B_activity start before C_activity?
In some reason, I must start them both in A_activity, and the time of startActivity(B) and startActivity(C) is not stable, maybe very short, like 100ms.