Android Bluetooth to Arduino and vice versa

Try this instead.

void onBluetoothDataEvent(String who, byte[] data) {
Str = new String(data);
background(int(Str));
}
And leave draw() empty.