这是我的fragmnet中的代码。 原始requestCode是:2
GoogleApiClient mGoogleApiClient;
mGoogleApiClient = new GoogleApiClient.Builder(getActivity())
.addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.addConnectionCallbacks(new GoogleConnectionCallbacks())
.addOnConnectionFailedListener(new GoogleonnectionFailedListener())
.build();
int a = 2;
IntentSender intentSender = Drive.DriveApi
.newOpenFileActivityBuilder()
.build(mGoogleApiClient);
getActivity().startIntentSenderForResult(intentSender, a, null, 0, 0, 0);
包含我的片段的活动中的代码:
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
}
现在requestCode是:131074。 为什么我没有得到requestCode = 2?