A Activity has a method called onActivityResult(). When the Activity started by startActivityForResult() is launched, it will enter this function. You can do relevant processing in it and then finish();
You can go to Baidu yourself for the specific method. It is really inconvenient for you to find it on your mobile phone.
A -> startActivityForResult() -> B Why don’t I understand the problem? You use startActivityForResult in A to start B. Doesn’t this mean that you expect B to return results to A? Why does A have to be closed when B returns?
Go to the manifest.xml file and change the startup mode of activity A to the following
A Activity has a method called onActivityResult(). When the Activity started by startActivityForResult() is launched, it will enter this function. You can do relevant processing in it and then finish();
You can go to Baidu yourself for the specific method. It is really inconvenient for you to find it on your mobile phone.
A -> startActivityForResult() -> B
Why don’t I understand the problem? You use startActivityForResult in A to start B. Doesn’t this mean that you expect B to return results to A? Why does A have to be closed when B returns?