public class

AsyncCustomEndpoints

extends CustomEndpoints
java.lang.Object
   ↳ com.kinvey.java.CustomEndpoints
     ↳ com.kinvey.android.AsyncCustomEndpoints

Class Overview

Wraps the com.kinvey.java.CustomEndpoints public methods in asynchronous functionality using native Android AsyncTask.

NOTE: It is the responsibility of the user to either use a KinveyListCallback or a KinveyClientCallback depending on what their Custom Endpoint returns.

Sample usage:

 mKinveyClient.customEndpoints().callEndpoint("myCustomCommand", null, new KinveyListCallback<GenericJson>() {
        public void onSuccess(GenericJson[] result) {
              results.setText(result[0].toString());
          
        public void onFailure(Throwable error) {
              results.setText("Uh oh -> " + error);
          }
      });
 }
 
The above sample assumes the Custom Endpoint takes no input null and returns an array of JSON objects.

Summary

Public Constructors
AsyncCustomEndpoints(AbstractClient client)
Constructor for this Asyncronous Custom Endpoint class
Public Methods
void callEndpoint(String commandName, GenericJson input, KinveyListCallback callback)
Execute a Custom Endpoint which will return an array of JSON objects.
void callEndpoint(String commandName, GenericJson input, KinveyClientCallback callback)
Execute a Custom Endpoint which will return a single JSON object
[Expand]
Inherited Methods
From class com.kinvey.java.CustomEndpoints
From class java.lang.Object

Public Constructors

public AsyncCustomEndpoints (AbstractClient client)

Constructor for this Asyncronous Custom Endpoint class

Public Methods

public void callEndpoint (String commandName, GenericJson input, KinveyListCallback callback)

Execute a Custom Endpoint which will return an array of JSON objects.

Parameters
commandName - the name of the Command to execute
input - any required input, can be null
callback - get results of the command as an array of JSON objects.

public void callEndpoint (String commandName, GenericJson input, KinveyClientCallback callback)

Execute a Custom Endpoint which will return a single JSON object

Parameters
commandName - the name of the Command to execute
input - any required input, can be null
callback - get results of the command as a single JSON object