java/android adaptation