If activity B is runing then the only one you can finish is activity B. That´s how android works.How I can close an activity from another activity?
StartActivity(B)
Activity.finish
StartActivity(C)
Hello,in B then when starting C
StartActivity(C)
Activity.Finish
Probably no cause BOTH commands are executed after the sub finishes.Is it a problem ?
You can NOT close activity B from C! ONLY B can. Or the system when it kills your process.But if I do not finish the activity B and from C back to main, how can I close it?
activity.finish
startactivity(main)
+1Yes, as long as the process is running.