adds check for API level; stops test if device is 'android' but API < 17

separates checkApiLevel functionality and cleans up little bits

cleans up the last bits