java.lang.Object | ||
↳ | com.kinvey.java.CustomEndpoints | |
↳ | com.kinvey.android.AsyncCustomEndpoints |
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.
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructor for this Asyncronous Custom Endpoint class
Execute a Custom Endpoint which will return an array of JSON objects.
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. |
Execute a Custom Endpoint which will return a single JSON object
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 |