Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/206.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用apigee android sdk连接apigee代理(Oauth验证)?_Android_Api_Proxy_Apigee - Fatal编程技术网

如何使用apigee android sdk连接apigee代理(Oauth验证)?

如何使用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)

我想在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);
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