add close() for Android