i wklej odpowiedź może być pomocne dla innych osób: , gdy zestaw launcheMode z Androidem: launchMode = "singleTask" również nie mogę uzyskać wyniku,
/* <p>Note that this method should only be used with Intent protocols
* that are defined to return a result. In other protocols (such as
* {@link Intent#ACTION_MAIN} or {@link Intent#ACTION_VIEW}), you may
* not get the result when you expect. For example, if the activity you
* are launching uses the singleTask launch mode, it will not run in your
* task and thus you will immediately receive a cancel result.
*/
oraz:
/* <p>As a special case, if you call startActivityForResult() with a requestCode
* >= 0 during the initial onCreate(Bundle savedInstanceState)/onResume() of your
* activity, then your window will not be displayed until a result is
* returned back from the started activity. This is to avoid visible
* flickering when redirecting to another activity.
*/
To nie działa dla mnie, ponieważ moje dane są update w "onPause" – Bostone
Jeśli twoja aktywność zostanie odtworzona po wywołaniu 'setResult()', twoje dane zostaną utracone. –