Start a new topic

what is correct way to invoke custom endpoint in Android?

The following section of the BL guide ( suggests we invoke a custom endpoint like this:

1. AsyncCustomEndpoints endpoints = getClient().customEndpoints();

2. endpoints.callEndpoint( etc... )

When I write line 1, I get the following deprecation warning: The method customEndpoints() from the type Client is deprecated

The changelog ( makes no mention of this deprecation.

Can someone confirm the correct way to invoke a custom endpoint in Android?

1 Comment

hey that deprecated method still works, however there are variations using Generics to allow for custom GenericJson classes for input and output.

Assuming you have two GenericJson classes, on is `MyRequestClass` and one is `MyResponseClass`:

AsyncCustomEndpoints endpoints = getClient().customEndpoints(MyResponseClass.class);

Then, when it's time to invoke, call:

endpoints.callEndpoint("doit", new MyRequestClass(), new KinveyListCallback() {


public void onSuccess(MyResponseClass[] result) {

if (result == null){

results.setText("nope, got null back!");


results.setText(result[0].toString()) ;




public void onFailure(Throwable error) {

results.setText("Uh oh -> " + error);



Login or Signup to post a comment