getObjectService Method
The getObjectService Method gets the current instance of the object service. The getObjectService method is invoked on the SDK instance; init must run successfully before invoking this method.
Syntax
getObjectService(String serviceName)
Return Type
ObjectService Instance
Parameters
Input Parameter | Type | Description | Required |
---|---|---|---|
servicename | String | Name of the object service | Yes |
Code
KonyClient client = new KonyClient(); client.initAsync(getApplicationContext(), < appkey > , < appSecret > , < serviceUrl > , new InitCallback() { @Override public void onSuccess(JSONObject serviceDoc) { kony.print("Init Success"); ObjectService objSVC = client.getObjectService( < servicename > ); } @Override public void onFailure(KonyException konyException) { kony.print("Init failed"); } });