Question

Can anyone tell me the difference between startActivity and startActivityForResult?

Is startActivity used to call Activity asynchronously and startActivityForResult for a synchronous call?

Are startActivity(intent) and startActivityForResult(intent,-1) same?

No correct solution

OTHER TIPS

Both startActvity() and startActivityForResult() are ASYNCHRONOUS.

There is no startSubActivity() in Android. It was replaced a long time ago by startActivityForResult().

  1. There is no startSubActivity() in Android. It was replaced a long time ago by startActivityForResult().
  2. The difference between them is that:
    startActivityForResult() starts an activity and expects something in return; startActivity() just starts an activity without worrying about getting any result.
  3. No. Both startActvity() and startActivityForResult() are ASYNCHRONOUS.
  4. Yes. startActivity(intent) and startActivityForResult(intent,-1) do the same.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top