Android Question Use External Bluetooth GPS, Instead of Internal GPS?

Discussion in 'Android Questions' started by nemiroG1, Mar 12, 2015.

  1. nemiroG1

    nemiroG1 Member Licensed User

    I am trying to find a way to use an external, bluetooth connected GPS in place of the internal one in my device, directly in my app. I have found a workaround to do this, by doing the following:

    - Connect external GPS via Bluetooth settings (indicates Paired, but not Connected)
    - Turn on "Allow Mock Locations" in Settings -> Developer Options
    - Install the "Bluetooth GPS" app from the Play store,

    - Run the Bluetooth GPS service, with Enable Mock GPS Provider checked
    - Enjoy the better GPS service

    My app in B4A picks up the new GPS, no problem. Everything works. My question is, how does the service work? I would really love to be able to incorporate a service like that directly into my app, so I do not have to run a third part app. Can anyone help with this? Thanks!
    Last edited: Mar 12, 2015
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can use the serial library to connect to the device. You will need to parse the NMEA strings. It isn't too complicated.

    Use AsyncStreamsText to handle the messages.
    nemiroG1 likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice