解决方案 »

  1.   

    标记下时间,2014-7-9号,如果有朋友有nexus 5,并刷了android L的话,方便的话 请告知,我这边写了个测试程序。
      

  2.   

    http://developer.radiusnetworks.com/2014/07/06/making-an-ibeacon-with-android-l.html
      

  3.   

    我也和你一样nexus 4 报这个错误
      

  4.   

    我的可以连接上,得到BluetoothGatt,但为什么BluetoothGatt.getService()为空
      

  5.   

     如何在advertiser.startAdvertising中 设定advertiseData
     我设的 数据 如下
    是否正确
          final byte[] manufacturerData = new byte[] {
                    (byte) 0x4c, (byte) 0x00, (byte) 0x02, (byte) 0x15, // fix
                    // proximity uuid 01020304-0506-0708-1112-131415161718
                    (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04, // uuid
                    (byte) 0x05, (byte) 0x06, (byte) 0x07, (byte) 0x08, // uuid
                    (byte) 0x11, (byte) 0x12, (byte) 0x13, (byte) 0x14, // uuid
                    (byte) 0x15, (byte) 0x16, (byte) 0x17, (byte) 0x18, // uuid
                    (byte) 0x01, (byte) 0x01, // major 257
                    (byte) 0x02, (byte) 0x02, // minor 514
                    (byte) 0xc5 // Tx Power -59但是我的程序报异常如下
      

  6.   

    10-08 23:02:30.146: E/AndroidRuntime(10701): FATAL EXCEPTION: main
    10-08 23:02:30.146: E/AndroidRuntime(10701): Process: com.example.zwm_debug, PID: 10701
    10-08 23:02:30.146: E/AndroidRuntime(10701): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.zwm_debug/com.zwm.test.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void android.bluetooth.IBluetoothGatt.registerClient(android.os.ParcelUuid, android.bluetooth.IBluetoothGattCallback)' on a null object reference
    10-08 23:02:30.146: E/AndroidRuntime(10701):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2255)
    10-08 23:02:30.146: E/AndroidRuntime(10701):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2317)
      

  7.   

    我刷的是nexus7 
    能否将测试程序发给我