Various fixes in android sample NativeActivity.