如何使用apigee android sdk连接apigee代理(Oauth验证)?
我想在android应用程序中使用apigee android sdk。通过使用android sdk,我想连接apigee端点代理,但api代理已经通过Oauth 2.0验证。如何访问我们的代理如何使用apigee android sdk连接apigee代理(Oauth验证)?,android,api,proxy,apigee,Android,Api,Proxy,Apigee,我想在android应用程序中使用apigee android sdk。通过使用android sdk,我想连接apigee端点代理,但api代理已经通过Oauth 2.0验证。如何访问我们的代理 //Create client entity String ORGNAME = "your-org"; String APPNAME = "your-app"; ApigeeClient apigeeClient = new ApigeeClient(ORGNAME,APPNAME)
//Create client entity
String ORGNAME = "your-org";
String APPNAME = "your-app";
ApigeeClient apigeeClient = new ApigeeClient(ORGNAME,APPNAME);
DataClient dataClient = apigeeClient.getDataClient();
String type = "item"; //entity type to be retrieved
Map queryString = null; //we don't need any additional query parameters, in this case
//call getCollectionAsync to initiate the asynchronous API call
dataClient.getCollectionAsync(type, queryString, new ApiResponseCallback() {
//If getEntitiesAsync fails, catch the error
@Override
public void onException(Exception e) {
// Error
}
//If getCollectionAsync is successful, handle the response object
@Override
public void onResponse(ApiResponse response) {
try {
if (response != null) {
// Success
}
} catch (Exception e) { //The API request returned an error
// Fail
}
}
});
Android SDK中目前不支持OAuth