I have two activities A and B. B is a transparent pass through activity, and A is seen. I want to kill B by pressing a button A.
Here\'s what I\'ve tried so far:
I found a nice way to finish one activity from another, it is similar to what Lumis did. So if you want to close ActivityA from ActivityB you can do this:
In ActivityA do:
className = this.getClass().getName();
and pass it on to AvtivityB. Then in ActivityB do:
((Activity) Class.forName(className).newInstance()).finish();
You can put a string with the name of your class into className yourself, but it needs to be a full name with package too.