platform/android: write the return value back to Android.