// Path: app/src/main/java/android/support/v17/leanback/streamingapp/api/IO.java
// public class IO {
// 
//     private static IO instance;
// 
//     public Socket socket;
// 
// 
//     public static Emitter emit(final String event, final String data, final Ack callback) {
//         return getInstance().socket.emit(event, data, callback);
//     }
//     public static Emitter emit(final String event, final JSONObject params, final Ack callback) {
//         return getInstance().socket.emit(event, params, callback);
//     }
//     public static Emitter emit(final String event, final Ack callback) {
//         return getInstance().socket.emit(event, callback);
//     }
// 
//     private IO() {
//         try {
//             socket = io.socket.client.IO.socket("http://192.168.1.103:8080/");
// 
//             socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() {
//                 @Override
//                 public void call(Object... args) {
//                     Log.i("socket-io", "Socket IO connected");
//                 }
// 
//             }).on("event", new Emitter.Listener() {
//                 @Override
//                 public void call(Object... args) {
// 
//                 }
// 
//             }).on(Socket.EVENT_DISCONNECT, new Emitter.Listener() {
//                 @Override
//                 public void call(Object... args) {
//                     Log.i("socket-io", "Socket IO disconnected");
//                 }
//             });
// 
//             socket.connect();
//         } catch (URISyntaxException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
// 
//     public static IO getInstance() {
//         if(instance == null) {
//             instance = new IO();
//         }
//         return instance;
//     }
// }


import android.app.Activity;
import android.os.Bundle;
import android.support.v17.leanback.streamingapp.R;
import android.support.v17.leanback.streamingapp.api.IO;
package android.support.v17.leanback.streamingapp.app;


/**
 * Created by theo on 17-03-05.
 */

public class BrowseActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.browser_fragment);

// Path: app/src/main/java/android/support/v17/leanback/streamingapp/api/IO.java
// public class IO {
// 
//     private static IO instance;
// 
//     public Socket socket;
// 
// 
//     public static Emitter emit(final String event, final String data, final Ack callback) {
//         return getInstance().socket.emit(event, data, callback);
//     }
//     public static Emitter emit(final String event, final JSONObject params, final Ack callback) {
//         return getInstance().socket.emit(event, params, callback);
//     }
//     public static Emitter emit(final String event, final Ack callback) {
//         return getInstance().socket.emit(event, callback);
//     }
// 
//     private IO() {
//         try {
//             socket = io.socket.client.IO.socket("http://192.168.1.103:8080/");
// 
//             socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() {
//                 @Override
//                 public void call(Object... args) {
//                     Log.i("socket-io", "Socket IO connected");
//                 }
// 
//             }).on("event", new Emitter.Listener() {
//                 @Override
//                 public void call(Object... args) {
// 
//                 }
// 
//             }).on(Socket.EVENT_DISCONNECT, new Emitter.Listener() {
//                 @Override
//                 public void call(Object... args) {
//                     Log.i("socket-io", "Socket IO disconnected");
//                 }
//             });
// 
//             socket.connect();
//         } catch (URISyntaxException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
// 
//     public static IO getInstance() {
//         if(instance == null) {
//             instance = new IO();
//         }
//         return instance;
//     }
// }


// Path: app/src/main/java/android/support/v17/leanback/streamingapp/app/BrowseActivity.java
import android.app.Activity;
import android.os.Bundle;
import android.support.v17.leanback.streamingapp.R;
import android.support.v17.leanback.streamingapp.api.IO;

package android.support.v17.leanback.streamingapp.app;


/**
 * Created by theo on 17-03-05.
 */

public class BrowseActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.browser_fragment);

        IO.getInstance();