title: Communication between BLE device and different android apps on same device
body: <p>I'm new in Android BLE so my question may be uncorrect or naive in some way. If this is the case please explain me where I'm wrong and kindly show me the correct way to manage this scenario.</p>
  
  <p>Scenario is the following: my Android app communicates with a BLE device sending commands and getting answers from device using BLE characteristics.</p>
  
  <p>Sequence is:</p>
  
  <ul>
  <li>Device wakes up the app (the <code>onConnectionStateChange</code> method is called)</li>
  <li>My app writes a command in a characteristic (I call <code>writeCharacteristic</code> putting the command in <code>value</code> parameter). </li>
  <li>Device sends back the answer to command to my app (the <code>onCharacteristicChanged</code> method is triggered and <code>value</code> parameter contains the answer)</li>
  </ul>
  
  <p>After waking up the app, the device doesn't do anything until a command is sent via <code>writeCharacteristic</code>. The device accepts different commands.</p>
  
  <p>All good so far, but recently I developed a second different app to communicate with same device. </p>
  
  <p>When I run both apps on same Android phone, one app sends a command to the device and the response is received by both apps! Of course the app that didn't sent the command receives an unexpected answer and goes to an unexpected status.</p>
  
  <p>Ok, knowing the problem I can modify both my apps to handle this situation, but the question is: Is this behavior normal when two apps in same device communicate with same BLE device?</p>
  
  <p>Is there a way for an app to establish a communication channel with a BLE device to avoid sending answer to specific commands to any other app except the one that sent the request?</p>
  
  <p>My guess is that <code>writeCharacteristic</code> and <code>onNotificationChanged</code> aren't the right functions for such kind of communication, but in this case which are the alternatives?</p>