package com.mxnavi.applauncher;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;

import java.util.Arrays;

public class MLinkService extends Service {
    private static final String TAG = "MLinkService";
    private IMlinkServiceClient mClient;

    @Override
    public IBinder onBind(Intent intent) {
        return mBinder;
    }

    IMlinkService.Stub mBinder = new IMlinkService.Stub() {

        @Override
        public void registerMlinkServiceClient(IMlinkServiceClient client) throws RemoteException {
            mClient = client;
        }

        @Override
        public void unregisterMlinkServiceClient(IMlinkServiceClient client) throws RemoteException {

        }

        @Override
        public boolean onBtConnectionStatus(boolean isConnected, String mac) throws RemoteException {
            return false;
        }

        @Override
        public boolean onReceivedBtData(byte[] data) throws RemoteException {
            Log.d(TAG, "onReceiveBtData : "+Arrays.toString(data));
            return false;
        }

        @Override
        public boolean onWifiConnectionStatus(boolean isConnected, String mac) throws RemoteException {
            return false;
        }
    };
}
