Android: Trying a dirty fix for issue #833.

Increased the buffer size and added a catch for buffer overflow
exceptions.
Merge pull request #834 from arthurbenemann/issue833

Android: Trying a dirty fix for issue #833.