Back to project page RPI-AndroidController.
The source code is released under:
Apache License
If you think the Android project RPI-AndroidController 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.jberglind.rpigpiocontroller; /*from w w w . ja va 2 s . c o m*/ import android.os.AsyncTask; import android.util.Log; public class ConnectionHandler extends AsyncTask<String, Void, String> { @Override protected String doInBackground(String... input) { String socketresponse = null; String command = input[0]; String ip = input[1]; String port_string = input[2]; int port = Integer.parseInt(port_string); SocketBuddy sbuddy = new SocketBuddy(); if (command.equals("status")) { socketresponse = sbuddy.status(command, ip, port); Log.d("Conhandler", socketresponse); return socketresponse; } else { sbuddy.sendStream(command, ip, port); return socketresponse; } } }