Fix text scanning for non-android case