How to get application output in byte[] instead of displaying on emulator?