androidraspberry-pigpsandroid-gpsandroid-things

Custom Location Services with external GPS connected to Raspberry Pi with android things


Hello I am wanting to connect an external GPS unit via I2C or serial to a raspberry pi 3 running android things to have this GPS unit provide location data.

So far using the Rasbarian OS I have a working python script with custom libraries. The script outputs raw NMEA data.

I am wondering how would I need to run this script to be able to have Android Location services use this data for location services? Would I need to create an app using the location services API? Or since this is a locally installed device would I need to write firmware or some kind? I am just wondering if someone could point me in the right direction of what kind of software I would need to write (an app or driver or firmware) in order to have this NMEA data accessible for location services.


Solution

  • Example of GPS driver connected via serial port you can find in Android Things user-space GPS driver and how to use it you can find in UART GPS sample for Android Things. Also take a look at Official Documentation and examples like this.