Obtaining a device's position – a simple example