Ejemplo n.º 1
0
    public void SetDataCallbackListener(Action <string> onRecieved, Action <string> onSentData, Action <string> onLogMessage)
    {
                #if UNITY_ANDROID
        if (Application.platform == RuntimePlatform.Android)
        {
            BluetoothDataCallback bluetoothDataCallback = new BluetoothDataCallback();
            bluetoothDataCallback.onRecieved   = onRecieved;
            bluetoothDataCallback.onDataSent   = onSentData;
            bluetoothDataCallback.onLogMessage = onLogMessage;

            jo.CallStatic("setDataCallbackListener", bluetoothDataCallback);
            AUP.Utils.Message(TAG, "setDataCallbackListener");
        }
        else
        {
            AUP.Utils.Message(TAG, "warning: must run in actual android device");
        }
                #endif
    }
Ejemplo n.º 2
0
    public void SetDataCallbackListener(Action <string>onRecieved,Action <string>onSentData,Action <string>onLogMessage)
    {
        #if UNITY_ANDROID
        if(Application.platform == RuntimePlatform.Android){
            BluetoothDataCallback bluetoothDataCallback = new BluetoothDataCallback();
            bluetoothDataCallback.onRecieved = onRecieved;
            bluetoothDataCallback.onDataSent = onSentData;
            bluetoothDataCallback.onLogMessage = onLogMessage;

            jo.CallStatic("setDataCallbackListener",bluetoothDataCallback);
            Utils.Message(TAG,"setDataCallbackListener");
        }else{
            Utils.Message(TAG,"warning: must run in actual android device");
        }
        #endif
    }