Skip to content

Instantly share code, notes, and snippets.

@hbcafe
hbcafe / gist:e6d53488acfdf6ae0fdf81caea0d2dfe
Created November 1, 2016 17:19
Connect native Android app to Watson Text to Speech in under 10 minutes (TTS interface)
package com.ibm.watsonvoicetts;
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
@hbcafe
hbcafe / gist:124c157db725ce6ad521c4e40343c0b2
Created November 1, 2016 17:13
Connect native Android app to Watson Text to Speech in under 10 minutes
package com.ibm.watsonvoicetts;
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
@hbcafe
hbcafe / gist:a16f0546fe56f687d9da994593b55a92
Created October 18, 2016 17:58
Connect native Android app to Watson Sentiment Analysis in under 10 minutes
package com.ibm.sentimentsensitiveapp;
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
@hbcafe
hbcafe / deploy.sh
Created February 10, 2016 18:34
Reference copy from github.com/referenceapps/adshells
#!/bin/bash
#cf push "${CF_APP}"
export count=`cat ./cnt.txt`
#count=12
echo ----$count-------
#./bin/cf add-plugin-repo bluemix http://plugins.ng.bluemix.net/
#./bin/cf install-plugin active-deploy -r bluemix
#./test.sh
echo "*******************************"
@hbcafe
hbcafe / doGet
Last active August 29, 2015 14:24
Developing an Apache Wink REST Client for Bluemix Liberty Runtime
/**
* @see HttpServlet#doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
*/
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {
System.out.println("===doGet===");
org.apache.wink.client.ClientConfig clientConfig = new org.apache.wink.client.ClientConfig();
org.apache.wink.client.RestClient client = new org.apache.wink.client.RestClient(clientConfig);
org.apache.wink.client.Resource resource = client.resource("http://restservicessamples.mybluemix.net/banking/Greeting");