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?
Unfortunately, this scenario is not supported right now. The best solution is to move the method to a helper class and have it shared among all the endpoint classes.