title: Android 4.3 BTLE as server: How to start advertisements?
body: <p>I am trying to implement a BTLE SERVER on the Nexus 7 with the new BTLE API in 4.3. I am running into several problems. First there are no examples with the SDK. The only example is for a client. Second, the documentation actually tells you to do the wrong thing. It states that one must use the <code>BluetoothAdapter.getProfileProxy() with a BluetoothProfile.GATT_SERVER</code> parameter to obtain the <code>BluetoothGattServer</code> object. This approach will work, but one will be unable to link one's implementation of the <code>BluetoothGattServerCallback</code> to the BLE stack. (This callback is how one responds to client read and write requests among other things.) However, after stumbling on issue 58582 a developer pointed to the new <code>BluetoothManager.openGattServer()</code> method which takes your callback as a parameter and returns a <code>BluetoothGattServer</code> object. Well, one problem solved.</p>
  
  <p>The next issue is more problematic. The <code>BluetoothGattServer</code> documentation states that one can use this class to create and advertise Bluetooth LE services and characteristics. Creating the services, etc. was not problem but they neglect to say how to start advertising. There is no method in the class itself or any other of the classes that I can find.</p>
  
  <p>Does anyone know how to do this? At the moment all I can see is to use the same approach as used by the client, but that approach involves scanning (which is not advertising). All the documentation further suggests that the <code>BluetoothAdapter.startLeScan()</code> IS indeed JUST for scanning.</p>
  
  <p>So how do I invoke advertisements once all my services, characteristics, and descriptors are in place?</p>