Please assist me in figuring out how to create an endpoint from a java class. A lot has changed in android studio, and the ability to:
Tools -> Google Cloud Tools -> Generate Endpoint
Or
Click on the java class and then select Generate Endpoint
Seems to have disappeared with the new android studio? What should I do, or am I missing something I need to do within android studio?
Code:
public class SearchObject {
private String Location;
public String getLocation() {
return Location;
}
public void setLocation(String location) {
Location = location;
}
}
Even tried to manully create the endpoint but doesn't seem to work, the reponse object is giving an error:
@Api(name = "searchApi",
version = "v1",
namespace = @ApiNamespace(ownerDomain = "backend.co.za",
ownerName = "backend.co.za",
packagePath=""))
public class SearchAPI {
@ApiMethod(name = "Search")
public void sayHi(@Named("location") String location) {
SearchObject response = new SearchObject();
response.setData("Hi, " + location); //Problem, cannot resolve method
return response;
}
}