Android Bluetooth

0
hi    I can not connect a galaxy tab A bluetooth with some others device by using cordova-plugin-bluetooth-serial. I am using Javascript actions and it's a hybrid app I used to connect them like month ago but somehow i can not connect it anymore. i tried using both bluetoothserial.connectInsecure and bluetoothserial.connect     i did convert my project from 7.23.3 to 7.23.6 and also update my hardware’s software.. so i am not quite sure if those might cause me this problem but the device still be able to connected with the different app correctly, such as Bluetooth terminal app   any advice would be nice.. i am trying to get my hybrid app connect with my hardware via bluetooth again   // this is a connecting part.. it always say that Device connection was lost function ConnectBluetoothDevice(address) { // BEGIN USER CODE if(address == "" || address == null){ alert("No address"); return Promise.reject(false); } else { bluetoothSerial.connectInsecure(address, function(){ return Promise.resolve(true); }, function(error){ alert(error); return Promise.reject(false); }); } // END USER CODE } //This part is always say that Device is connected after that first attempt //to connect even though it's not connected at all function DeviceIsConnected() { // BEGIN USER CODE return new Promise(function(resolve){ bluetoothSerial.isConnected( function() { resolve(true); }, function(error) { alert(error); resolve(false); } ); } ); // END USER CODE }
asked
5 answers
2

Hi Pasit,

Did you try out the Android Bluetooth connector kit from the app store? this should give you some snippets that you can use to connect your Mendix app to your device.

https://appstore.home.mendix.com/link/app/109310/

answered
0

any help would be nice.. still can not connect hardware’s bluetooth with my app by using Javascript action from bluetooth-serial-plugin.   Are there others alternative to do that in mendix??

answered
0

is there another plugin i should try with my hybrid app to connect device’s bluetooth? any help would be nice

answered
0

bluetoothserial.subscribe is not working. using bluetoothserial.read instead. Anyway i have build a new bluetoothconnectmobile widget. hope this will solve the problem for mendix community

answered
0

Hello...had the same issue where Bluetooth was working with my new pixel 3 xl last week and then suddenly topped this week with other older Bluetooth devices also connecting and disconnecting every several seconds (my Tune2air device}.

answered