app/src/main/java/com/adroitdevs/belanja/TasksModel.java
private URI createServerURI() throws URISyntaxException {
        // We store this in plain text for the purposes of simple demonstration,
        // you might want to use something more secure. It is worth encrypting this information.
        String username = mContext.getResources().getString(R.string.cloudant_username);
        String dbName = mContext.getResources().getString(R.string.cloudant_dbname);
        String apiKey = mContext.getResources().getString(R.string.cloudant_api_key);
        String apiSecret = mContext.getResources().getString(R.string.cloudant_api_password);
        String host = username + ".cloudant.com";

        // We recommend always using HTTPS to talk to Cloudant.
        return new URI("https", apiKey + ":" + apiSecret, host, 443, "/" + dbName, null, null);
    }
/**
     * Returns the URI for the remote database, based on the app's
     * configuration.
     * <p>
     * URI is created based on user Cloudant credentials in cloudant_credentials.xml.
     *
     * @return the remote database's URI.
     * @throws URISyntaxException if the settings give an invalid URI.
     */
Returns the URI for the remote database, based on the app's
configuration.

URI is created based on user Cloudant credentials in cloudant_credentials.xml.

@return the remote database's URI.
@throws URISyntaxException if the settings give an invalid URI.
Returns the URI for the remote database based on the app ' s configuration . URI is created based on user Cloudant credentials in cloudant_credentials . xml . @return the remote database ' s URI . @throws URISyntaxException if the settings give an invalid URI .
private URI createServerURI() throws URISyntaxException {
        String username = mContext.getResources().getString(R.string.cloudant_username);
        String dbName = mContext.getResources().getString(R.string.cloudant_dbname);
        String apiKey = mContext.getResources().getString(R.string.cloudant_api_key);
        String apiSecret = mContext.getResources().getString(R.string.cloudant_api_password);
        String host = username + ".cloudant.com";
        return new URI("https", apiKey + ":" + apiSecret, host, 443, "/" + dbName, null, null);
    }
private URI createServerURI ( ) throws URISyntaxException { String username = mContext . getResources ( ) . getString ( R . string . cloudant_username ) ; String dbName = mContext . getResources ( ) . getString ( R . string . cloudant_dbname ) ; String apiKey = mContext . getResources ( ) . getString ( R . string . cloudant_api_key ) ; String apiSecret = mContext . getResources ( ) . getString ( R . string . cloudant_api_password ) ; String host = username + ".cloudant.com" ; return new URI ( "https" , apiKey + ":" + apiSecret , host , 443 , "/" + dbName , null , null ) ; }
Returns the URI for the remote database, based on the app's
 configuration.
Returns the URI for the remote database based on the app ' s configuration .
// We store this in plain text for the purposes of simple demonstration, // you might want to use something more secure. It is worth encrypting this information. // We recommend always using HTTPS to talk to Cloudant.