detect apn