Package ej.bluetooth

Class BluetoothNatives


  • public class BluetoothNatives
    extends java.lang.Object
    Not in API.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean addService​(byte[] service, short[] handles)  
      static boolean connect​(byte[] deviceAddress)  
      static void disable()  
      static boolean disconnect​(short connHandle)  
      static boolean discoverServices​(short connHandle, byte[] uuid)  
      static boolean enable()  
      static boolean sendExecuteWriteResponse​(short connHandle, short attributeHandle, byte status)  
      static boolean sendNotification​(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean confirm)  
      static boolean sendPairRequest​(short connHandle)  
      static boolean sendPairResponse​(short connHandle, boolean accept)  
      static boolean sendPasskeyResponse​(short connHandle, boolean accept, int passkey)  
      static boolean sendPrepareWriteResponse​(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize, int offset)  
      static boolean sendReadRequest​(short connHandle, short attributeHandle)  
      static boolean sendReadResponse​(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize)  
      static boolean sendWriteRequest​(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean noResponse)  
      static boolean sendWriteResponse​(short connHandle, short attributeHandle, byte status)  
      static boolean startAdvertising​(byte[] advertisementData, int advertisementDataSize)  
      static boolean startScanning​(byte filterAction, byte filterType, byte[] filterData, int filterDataSize)  
      static boolean stopAdvertising()  
      static boolean stopScanning()  
      static int waitEvent​(byte[] buffer, int bufferLength)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • waitEvent

        public static int waitEvent​(byte[] buffer,
                                    int bufferLength)
      • enable

        public static boolean enable()
      • disable

        public static void disable()
      • addService

        public static boolean addService​(byte[] service,
                                         short[] handles)
      • startScanning

        public static boolean startScanning​(byte filterAction,
                                            byte filterType,
                                            byte[] filterData,
                                            int filterDataSize)
      • stopScanning

        public static boolean stopScanning()
      • startAdvertising

        public static boolean startAdvertising​(byte[] advertisementData,
                                               int advertisementDataSize)
      • stopAdvertising

        public static boolean stopAdvertising()
      • connect

        public static boolean connect​(byte[] deviceAddress)
      • disconnect

        public static boolean disconnect​(short connHandle)
      • sendPairRequest

        public static boolean sendPairRequest​(short connHandle)
      • sendPairResponse

        public static boolean sendPairResponse​(short connHandle,
                                               boolean accept)
      • sendPasskeyResponse

        public static boolean sendPasskeyResponse​(short connHandle,
                                                  boolean accept,
                                                  int passkey)
      • discoverServices

        public static boolean discoverServices​(short connHandle,
                                               @Nullable
                                               byte[] uuid)
      • sendReadRequest

        public static boolean sendReadRequest​(short connHandle,
                                              short attributeHandle)
      • sendWriteRequest

        public static boolean sendWriteRequest​(short connHandle,
                                               short attributeHandle,
                                               byte[] value,
                                               int valueSize,
                                               boolean noResponse)
      • sendReadResponse

        public static boolean sendReadResponse​(short connHandle,
                                               short attributeHandle,
                                               byte status,
                                               byte[] value,
                                               int valueSize)
      • sendWriteResponse

        public static boolean sendWriteResponse​(short connHandle,
                                                short attributeHandle,
                                                byte status)
      • sendPrepareWriteResponse

        public static boolean sendPrepareWriteResponse​(short connHandle,
                                                       short attributeHandle,
                                                       byte status,
                                                       byte[] value,
                                                       int valueSize,
                                                       int offset)
      • sendExecuteWriteResponse

        public static boolean sendExecuteWriteResponse​(short connHandle,
                                                       short attributeHandle,
                                                       byte status)
      • sendNotification

        public static boolean sendNotification​(short connHandle,
                                               short attributeHandle,
                                               byte[] value,
                                               int valueSize,
                                               boolean confirm)