Problem with bluetooth when trying to send & receive in same time.

when I'm trying to send data, and the other device also try to send data, it seems like the data is corrupted when I'm calling to receive method (if I send 'a', I got something like ' ˜ ' or something like this)
This is the scenario:
Arduino and Android communicate via bluetooth.

  1. Arduino wants to send data.
  2. Arduino has data to receive (still not pull them).
  3. Arduino send the data to android.
  4. Android get a corrupted data.
    If in step 2 the receive buff was empty, the data that arduino sent would be send without any damaged.
    There is a simple method that can solve this problem for me?

when I'm trying to send data, and the other device also try to send data, it seems like the data is corrupted

The incoming serial data and the outgoing serial data are in separate buffers, so that is unlikely.

What is more likely is that your code is at fault. Post it if you want help with it.