9

I just started Google Cloud Endpoints.

When running android app, I have the following warning in logcat:

Tag: AbstractGoogleClient
Text: Application name is not set. Call Builder#setApplicationName.

Where to set Application name? Is it in android or app engine/cloud endpoints?

JR Galia
  • 17,229
  • 19
  • 92
  • 144

1 Answers1

6

The Class com.google.api.client.googleapis.services.AbstractGoogleClient has a function

public Builder setApplicationName(String applicationName) {
      this.applicationName = applicationName;
      return this;
    }

When using Gradle to generate your client libraries using appengineEndpointsInstallClientLibs You should be able to create an endpointbuilder for your endpoints:

private YourEndpoint.Builder endpointBuilder = new YourEndpoint.Builder(
            AndroidHttp.newCompatibleTransport(), new JacksonFactory(),
            new HttpRequestInitializer() {
                public void initialize(HttpRequest httpRequest) {
                }
            }
    );

then... to get rid of the warning:

endpointBuilder.setApplicationName("Some crazy App Name");
Tom Bevelander
  • 1,686
  • 1
  • 22
  • 31