Are the processes in android asynchronous? If they are asynchronous then how can we conclude when the activity or process is finished or completed its execution.
Are the processes in android asynchronous? If they are asynchronous then how can we
Share
Processes are neither synchronous or asynchronous, in any operating system. Forking processes is frequently asynchronous.
Since, at the SDK level, you are generally unaware of what is going on in terms of processes, this question is moot for Android. Besides, just about everything in Android is asynchronous —
startActivity(), for example.Generally, you should not care.
You can specially construct a pair of activities, where the first activity uses
startActivityForResult()and the second activity callssetResult(). Then, the first activity will be called withonActivityResult()to supply the result from the second activity. The result is triggered when the second activity closes (e.g., second activity callsfinish(), user presses BACK button).