From Android 4.0, it is not allowed to do network io on main thread.
Do write method in another thread to adapt this change.
Bug: 113998459
Test: manual test with two devices
Change-Id: I0d251fab110d34167d47e9c3a50af3307b76d5b7
Add LOCAL_DEX_PREOPT := false to force the samples to build actual apks.
In addition, fix a couple of other small issues:
- TtsEngine didn't have the api level set properly.
- SimpleJNI used a non-ndk library and was using libc++.
Change-Id: I1fd7c187956eed4620049bb746f4d62babcd648a