I am using Conductor in place of Fragment which gets attached to activity.
Scenario:
LocationConductor
which has attached to MotherActivity
. From LocationConductor
, I am accessing GoogleApiClient
which request for LocationRequest
dialog.
From LocationConductor :
LocationSettingsResult.getStatus().startResolutionForResult(getActivity(), RC_LOCATION_SETTINGS);
It request LocationRequestDialog
using GoogleApiClient
which requires Activity
Context. The CallBack from the Dialog will be back in onActivityResult
of MotherActivity
as Activity
Context is passed.
Question :
Tried :
registerForActivityResult : Registers this Controller to handle onActivityResult responses. Calling this method is NOT necessary when calling {@link #startActivityForResult(Intent, int)}
You can just call Router.onActivityResult()
from within the activity's onActivityResult call to forward it along. If the activity itself calls startActivityForResult
, there's no way to capture the results automatically. The same would go for fragments.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.