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 }
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 }