cloud/src/main/java/com/adamg/materialtemplate/cloud/module/RestApiModule.java
@Provides
    Endpoint providesEndpoint(@CloudLibModule.ClientApplication Context ctx) {
        // Get the current server
        final int server = ctx.getResources().getInteger(R.integer.current_server);

        // Server protocol
        final String protocol = getProtocol(ctx, server);

        // Server host
        final String serverHost = getHost(ctx, server);

        // Server port
        final int serverPort = getPort(ctx, server);

        return getEndpoint(protocol, serverHost, serverPort);
    }
/**
     * Module which provides the base URL for APIs
     *
     * @param ctx the client's Context
     * @return an Endpoint constructed for the base URL in use with Retrofit
     */
Module which provides the base URL for APIs
@param ctx the client's Context
@return an Endpoint constructed for the base URL in use with Retrofit
Module which provides the base URL for APIs @param ctx the client ' s Context @return an Endpoint constructed for the base URL in use with Retrofit
@Provides
    Endpoint providesEndpoint(@CloudLibModule.ClientApplication Context ctx) {
        final int server = ctx.getResources().getInteger(R.integer.current_server);
        final String protocol = getProtocol(ctx, server);
        final String serverHost = getHost(ctx, server);
        final int serverPort = getPort(ctx, server);
        return getEndpoint(protocol, serverHost, serverPort);
    }
@ Provides Endpoint providesEndpoint ( @ CloudLibModule . ClientApplication Context ctx ) { final int server = ctx . getResources ( ) . getInteger ( R . integer . current_server ) ; final String protocol = getProtocol ( ctx , server ) ; final String serverHost = getHost ( ctx , server ) ; final int serverPort = getPort ( ctx , server ) ; return getEndpoint ( protocol , serverHost , serverPort ) ; }
Module which provides the base URL for APIs
 @param ctx the client's Context
 @return an Endpoint constructed for the base URL in use with Retrofit
Module which provides the base URL for APIs @param ctx the client ' s Context @return an Endpoint constructed for the base URL in use with Retrofit
// Get the current server // Server protocol // Server host // Server port