What is the purpose of "setApplicationName" in the Google APIs Java client library?

Viewed 318

I can't seem to find any information on the Application Name used by various Google API services. The best I can figure is that it might simply be a name that will display on the consent screen? Below is an example of the application name I'm talking about.

calendarService = new Calendar.Builder( HTTP_TRANSPORT , JSON_FACTORY , credential )
        .setApplicationName( applicationName )
        .build();

Also, if I create multiple calendarServices, would/should I give each a unique application name?

1 Answers
setApplicationName( applicationName )

I beleave that the name displayed to the user on the consent screen is configured in Google developer console when you set up the Client screen.

As far as I know the Application name is sent as part of the user agent Header on all HTTP requests to google but you will need to check the Google api java client.

Update:

Its definatly used for the UserAgent header : AbstractGoogleClient.java

Related