如何在android中使用onActivityResult多个

时间:2016-04-14 23:08:22

标签: android social-networking

enter code here public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    //If signin
    if (requestCode == RC_SIGN_IN) {
        GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
        //Calling a new function to handle signin
        handleSignInResult(result);
    }

//这是为facebook callbackManager.onActivityResult(requestCode,resultCode,data);

1 个答案:

答案 0 :(得分:0)

请参阅开发人员指南http://developer.android.com/training/basics/intents/result.html

这取决于您在分配startActivity(intent,request_Code)时提供的请求代码,您可以执行多个操作。