src/main/java/com/simpligility/maven/plugins/android/common/AndroidPublisherHelper.java
public static AndroidPublisher init( String applicationName,
            @Nullable String serviceAccountEmail ) throws IOException, GeneralSecurityException
    {
        Preconditions.checkArgument( !Strings.isNullOrEmpty( applicationName ),
                "applicationName cannot be null or empty!" );

        // Authorization.
        newTrustedTransport();
        Credential credential;
        credential = authorizeWithServiceAccount( serviceAccountEmail );

        // Set up and return API client.
        return new AndroidPublisher.Builder(
                httpTransport, JSON_FACTORY, credential ).setApplicationName( applicationName )
                .build();
    }
public static AndroidPublisher init( String applicationName,
            @Nullable String serviceAccountEmail ) throws IOException, GeneralSecurityException
    {
        Preconditions.checkArgument( !Strings.isNullOrEmpty( applicationName ),
                "applicationName cannot be null or empty!" );

        // Authorization.
        newTrustedTransport();
        Credential credential;
        credential = authorizeWithServiceAccount( serviceAccountEmail );

        // Set up and return API client.
        return new AndroidPublisher.Builder(
                httpTransport, JSON_FACTORY, credential ).setApplicationName( applicationName )
                .build();
    }
Performs all necessary setup steps for running requests against the API.

@param applicationName the name of the application: com.example.app
@param serviceAccountEmail the Service Account Email (empty if using
installed application)
@return the {@Link AndroidPublisher} service
@throws GeneralSecurityException
@throws IOException