updated to be compatible with latest Android SDK