Back to project page OOB-Sample-App.
The source code is released under:
GNU General Public License
If you think the Android project OOB-Sample-App listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.oobexampleapp; /*from w w w. j av a 2s . c o m*/ /** Copyright 2014 Dr Richard Wallace */ import java.io.IOException; import android.os.AsyncTask; import android.util.Log; public class DoRequest extends AsyncTask<String, Void, String> { private final MainActivity main; private static final String TAG = "PandorabotsTalkAPIDemo"; public static String botname = // insert botname here PandorabotsAPI pApi; public DoRequest(MainActivity main, String clientName) { super(); this.main = main; this.pApi = new PandorabotsAPI(MagicParameters.hostname, MagicParameters.username, MagicParameters.userkey, clientName); } @Override protected String doInBackground(String... strings) { return pApi.talk(botname, strings[0]); } @Override protected void onPostExecute(String result) { main.processBotResponse(result); } }