Function wasn't compatible with API level 8