我想使用Box SDK进行身份验证。
我得到了Box Java SDK V2和Box Android SDK V2。 我正在使用Box Android SDK中的basic authentication code
Intent intent = OAuthActivity.createOAuthActivityIntent(this, clientId,
clientSecret);
startActivityForResult(intent);
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == Activity.RESULT_CANCELED) {
// Get the error message for why authentication failed.
String failMessage = data.getStringExtra(OAuthActivity.ERROR_MESSAGE);
// Implement your own logic to handle the error.
handleFail(failMessage);
} else {
// You will get an authenticated BoxClient object back upon success.
BoxClient client =
data.getParcelableExtra(OAuthActivity.BOX_CLIENT);
youOwnMethod(client);
}
}
但是我收到了这个错误:
The method createOAuthActivityIntent(Context, String, String) from the type OAuthActivity refers to the missing type Intent
这可能是愚蠢的我做错了,但有人可以告诉我什么吗?
答案 0 :(得分:0)