I'm developing an Android app with Google Cloud Endpoints, I have read a lot of documentation and tutorials about it, but there is still one information missing: How can I choose which backend's methods will be visible for Android client?
Let's say I have a FriendshipEndpoint, FriendshipEndpoint has this method:
@ApiMethod(name = "listFriendship", path = "listFriendship")
public CollectionResponse<Friendship> listFriendship(
@Nullable @Named("cursor") String cursorString,
@Nullable @Named("limit") Integer limit)
EDIT FriendshipEndpoint is annotated with @Api annotation
This method should be visible only in the backend (not by Android client).
I have tried to remove @ApiMethod anotation -> doesn't work, the method is still visible in the api explorer in my browser.
Setting access modifier to private is not a solution for me, because I want to call this method from other Endpoint.
Removing access modifier is also no solution for me, because I need this method to be visible from other packages (test package).
Is there a solution for this problem at all?
@ApiMethodannotation, did you re-runupdateandendpoints_get_client_libmaven goals? The annotation is what will cause the method to be excluded from the cloud API exposed via REST and the client library. - Larry Schiefer@ApiMethodannotation, the method was still "visible for the world", so it could also be callable by Android client. What you are saying is in contrary with "all public, non static, non bridge methods in a class with an@Apiannotation are exposed in the API, whether they have an@ApiMethodannotation or not." [1], isn't it? My Endpoint is also annotated with@Apiannotation. (cloud.google.com/appengine/docs/java/endpoints/…) - FilipR