Search
Link Search Menu Expand Document
Kony Quantum is now HCL Volt MX. See Revised Terminology. Current Quantum users, see the important note about API naming.

User Guide: SDKs > Android SDK > Invoking an Object Service > getObjectService Method

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

 VoltMXClient client = new VoltMXClient();
client.initAsync(getApplicationContext(), < appkey > , < appSecret > , < serviceUrl > , new InitCallback() {
    @Override
    public void onSuccess(JSONObject serviceDoc) {
        voltmx.print("Init Success");
        ObjectService objSVC = client.getObjectService( < servicename > );
    }

    @Override
    public void onFailure(VoltMXException voltmxException) {
        voltmx.print("Init failed");
    }
});