An electronic device (1) includes: a positional information obtaining section (21) for obtaining positional information; a boarding determining section (12) for determining whether or not a user has boarded or exited a vehicle; and a frequency switching section (14) for switching a frequency, at which the positional information is obtained, from a first frequency to a second frequency in a case where it is determined that the user has boarded or exited the vehicle.