Support for "Mock Locations"?

112 views
Skip to first unread message

Isaac Ullah

unread,
May 28, 2015, 8:21:07 PM5/28/15
to geopapara...@googlegroups.com
Hi folks, 

   I've recently figured out the (somewhat annoying) process of connecting an external bluetooth-enabled GPS (like a Trimble GeoXT) unit to an android device. In short, the key issue is that the GPS data from the external device can only be sent to location aware apps by checking the "Allow Mock Locations" in the developer settings menu, and then using an intermediary app to make the BT connection and broadcast the incoming GPS data as the mock location (I'm using the "Bluetooth GPS" app). So, I figured out all of that, and have the external GPS data being sent as the mock location, but, alas, it seems Geopap doesn't accept location information from the Mock Location stream? I'm not fully sure how it all works (i.e., internal GPS vs mock location vs A-GPS vs network provided location). Does anyone here understand how all that works, and whether or not Geopap could be made to accept this kind of "mock" location data?

I'm, as always, happy to provide any more info, undertake any suggested tests, and happy to deploy any possible solutions. I have access to a Google Nexus 4 and a Google Nexus 9, and could try solutions on both pieces of hardware.

andrea antonello

unread,
May 29, 2015, 2:23:29 AM5/29/15
to geopaparazzi-u.
Hi Isaac,
 
   I've recently figured out the (somewhat annoying) process of connecting an external bluetooth-enabled GPS (like a Trimble GeoXT) unit to an android device. In short, the key issue is that the GPS data from the external device can only be sent to location aware apps by checking the "Allow Mock Locations" in the developer settings menu, and then using an intermediary app to make the BT connection and broadcast the incoming GPS data as the mock location (I'm using the "Bluetooth GPS" app). So, I figured out all of that, and have the external GPS data being sent as the mock location, but, alas, it seems Geopap doesn't accept location information from the Mock Location stream? I'm not fully sure how it all works (i.e., internal GPS vs mock location vs A-GPS vs network provided location). Does anyone here understand how all that works, and whether or not Geopap could be made to accept this kind of "mock" location data?

I tried that in the past with some app (of which I do not remember the name), and it worked properly. 

These apps substitute the gps of android and pass them data (real or not) as if they were the gps. So any app should then use that as the gps. So there is nothing to be done on the geopaparazzi side, since it should go automagic.

On a sidenote, it is a while we are looking for fundings to add directly to geopap support for an extrenal gps (NMEA, but maybe also some other protocol), but we were not successful yet. It is on our wishlist though, so maybe sometimes...

Cheers,
Andrea

 

I'm, as always, happy to provide any more info, undertake any suggested tests, and happy to deploy any possible solutions. I have access to a Google Nexus 4 and a Google Nexus 9, and could try solutions on both pieces of hardware.

--
You received this message because you are subscribed to the Google Groups "geopaparazzi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tim

unread,
May 29, 2015, 7:11:58 AM5/29/15
to geopapara...@googlegroups.com
Issac,
I have also tried to use an external GPS with the app "Bluetooth GPS" and was not successful. "Bluetooth GPS" also has a test version (Android 4) that will work without using mock locations (accessed by rooting your unit) which I also tried without full success.   

It is *great* to hear Andrea mention this is on the wishlist for geopaparazzi to include native support for!  I have been thinking the same thing for a while now. Maybe someday!

Best, 
Tim
Hi Isaac,
To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-users+unsub...@googlegroups.com.

Isaac Ullah

unread,
May 29, 2015, 7:45:29 PM5/29/15
to geopapara...@googlegroups.com
Hi Andrea,

   That is, indeed, the same app I am using. I've been looking into the issue, and I think it might be that "Bluetooth GPS" sends the mock location as a replacement for the "network provided" location, and not the GPS location? I turn on location services, but Geopaparazzi always says "cannot take point if GPS is off" (or some message to that affect). Basically, Geopap seems to think the GPS is turned off, even though there is location information coming through (and which is picked up by other location-aware apps).

It would be really, really, really nice if Geopap gets that functionality! Just as an FYI, I had some e-mails with the developer of that Bluetooth GPS app you linked to. He's apparently happy to have his app linked into third-party apps. If you read the description for that app, you will see this:

Now you can start/stop the service from other apps by sending the service or broadcast Intent :

Start - googoo.android.btgps.action.SERVICE_START
Stop - googoo.android.btgps.action.SERVICE_STOP
Toggle - googoo.android.btgps.action.SERIVCE_TOGGLE

* Note: You should first make sure you setup all the preferences and you can start the service correctly through the GUI frontend.

So, it might be possible to use that app to do achieve that external linkage, much in the same way the "GPS Status" app is used for the compass view. Just a suggestion!

Hi Isaac,
To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-users+unsub...@googlegroups.com.

Isaac Ullah

unread,
May 29, 2015, 7:47:08 PM5/29/15
to geopapara...@googlegroups.com
Thanks Tim,

   I haven't tried the test version of "Bluetooth GPS", but this tablet I'm using belongs to the University, so I can't root it anyway (even though being able to do that would probably make my life easier!).

~Isaac

Eli Adam

unread,
Jun 4, 2015, 1:02:30 AM6/4/15
to geopapara...@googlegroups.com


On May 29, 2015 7:45 PM, "Isaac Ullah" <isaac...@gmail.com> wrote:
>
> Hi Andrea,
>
>    That is, indeed, the same app I am using. I've been looking into the issue, and I think it might be that "Bluetooth GPS" sends the mock location as a replacement for the "network provided" location, and not the GPS location? I turn on location services, but Geopaparazzi always says "cannot take point if GPS is off" (or some message to that affect). Basically, Geopap seems to think the GPS is turned off, even though there is location information coming through (and which is picked up by other location-aware apps).

Have you tried turning network location off on the phone in the android settings? On some similar apps, that must be off to work spoofing the gps.

Best regards,  Eli

>
> It would be really, really, really nice if Geopap gets that functionality! Just as an FYI, I had some e-mails with the developer of that Bluetooth GPS app you linked to. He's apparently happy to have his app linked into third-party apps. If you read the description for that app, you will see this:
>
> Now you can start/stop the service from other apps by sending the service or broadcast Intent :
>
> Start - googoo.android.btgps.action.SERVICE_START
> Stop - googoo.android.btgps.action.SERVICE_STOP
> Toggle - googoo.android.btgps.action.SERIVCE_TOGGLE
>
> * Note: You should first make sure you setup all the preferences and you can start the service correctly through the GUI frontend.
>
> So, it might be possible to use that app to do achieve that external linkage, much in the same way the "GPS Status" app is used for the compass view. Just a suggestion!
>
>
>
>
> On Thursday, May 28, 2015 at 11:23:29 PM UTC-7, moovida wrote:
>>
>> Hi Isaac,
>>  
>>>
>>>    I've recently figured out the (somewhat annoying) process of connecting an external bluetooth-enabled GPS (like a Trimble GeoXT) unit to an android device. In short, the key issue is that the GPS data from the external device can only be sent to location aware apps by checking the "Allow Mock Locations" in the developer settings menu, and then using an intermediary app to make the BT connection and broadcast the incoming GPS data as the mock location (I'm using the "Bluetooth GPS" app). So, I figured out all of that, and have the external GPS data being sent as the mock location, but, alas, it seems Geopap doesn't accept location information from the Mock Location stream? I'm not fully sure how it all works (i.e., internal GPS vs mock location vs A-GPS vs network provided location). Does anyone here understand how all that works, and whether or not Geopap could be made to accept this kind of "mock" location data?
>>
>>
>> I tried that in the past with some app (of which I do not remember the name), and it worked properly. 
>> It should be something like:https://play.google.com/store/apps/details?id=googoo.android.btgps
>>
>> These apps substitute the gps of android and pass them data (real or not) as if they were the gps. So any app should then use that as the gps. So there is nothing to be done on the geopaparazzi side, since it should go automagic.
>>
>> On a sidenote, it is a while we are looking for fundings to add directly to geopap support for an extrenal gps (NMEA, but maybe also some other protocol), but we were not successful yet. It is on our wishlist though, so maybe sometimes...
>>
>> Cheers,
>> Andrea
>>
>>  
>>>
>>>
>>> I'm, as always, happy to provide any more info, undertake any suggested tests, and happy to deploy any possible solutions. I have access to a Google Nexus 4 and a Google Nexus 9, and could try solutions on both pieces of hardware.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups "geopaparazzi-users" group.

>>> To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-us...@googlegroups.com.


>>> For more options, visit https://groups.google.com/d/optout.
>>
>>

> --
> You received this message because you are subscribed to the Google Groups "geopaparazzi-users" group.

> To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-us...@googlegroups.com.

Isaac Ullah

unread,
Jun 12, 2015, 3:45:15 PM6/12/15
to geopapara...@googlegroups.com
Thanks for the suggestion Eli. I was tied up with other things for a while, but got around to testing today. To my dismay, however, I discovered that geopap is again broken on the Nexus 9. There was another round of updates from Google last week, so I have a feeling that those broke something. It seems to be yet another permissions error (different than the one I was having before the 5.1.1 lollipop update). It's a bit of a bummer that I can't get it to all work. I'm leaving for the field next week, so will, unfortunately, have to figure out another solution for field data recording (probably {gasp!} GeoODK).

Cheers,

~Isaac

>>> To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-users+unsub...@googlegroups.com.


>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups "geopaparazzi-users" group.

> To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-users+unsub...@googlegroups.com.

andrea antonello

unread,
Jun 19, 2015, 2:47:24 AM6/19/15
to geopaparazzi-u.
> Thanks for the suggestion Eli. I was tied up with other things for a while,
> but got around to testing today. To my dismay, however, I discovered that
> geopap is again broken on the Nexus 9. There was another round of updates
> from Google last week, so I have a feeling that those broke something. It
> seems to be yet another permissions error (different than the one I was
> having before the 5.1.1 lollipop update). It's a bit of a bummer that I
> can't get it to all work. I'm leaving for the field next week, so will,

this is either quite some bad luck or something is really odd in
geopap. I have no idea how to reproduce your errors. I might believe
that 1 android update could have fixed the first problem, but find it
hard to believe that then another breaks stuff again. Or better, I
would love if it was true, but I think it might more be a Geopap
issue.

> unfortunately, have to figure out another solution for field data recording
> (probably {gasp!} GeoODK).

I am sorry to hear that but have no way to help you if I can't
reproduce the problem.
I am on geopap these days, so if something comes to your mind, shoot.
But I assume you are in the field already.

Cheers,
Andrea
>> >>> an email to geopaparazzi-us...@googlegroups.com.
>> >>> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "geopaparazzi-users" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an email to geopaparazzi-us...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "geopaparazzi-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to geopaparazzi-us...@googlegroups.com.

Dotzo Dotzov

unread,
Jul 23, 2021, 6:35:14 AM7/23/21
to geopaparazzi-users
Hi Andrea and all,

For some time now I have been thinking of buying an external GNSS receiver to have more accurate positioning. Recently I had the chance to test a very simple external USB unit TOPGNSS GN803G. It successfully connected to my Android and I can see it in the "intermediate" app - GPS Connector. There I can even see SBAS satellites! Further I think I set up everything properly - turned on Mock location in the intermediate app and turned it on in Developer Options. So theoretically everything should work. But... it does not.

Practically all apps, including SMASH and Geopaparazzi complain that the Google location is turned off. So this Mock location thing seems to remain a "mock" since the time this conversation was started here.

And if I turn the Location on, all apps are using the buit-in GNSS receiver of the phone and completely refuse to see the Mock Location provider or even look for it.

Any ideas if I can actually make use of an external GNSS receiver on an Android in SMASH? Because seems like no and I'm suspending the purchase.

Thanks and regards,

Dotzo 

andrea antonello

unread,
Aug 24, 2021, 2:17:47 AM8/24/21
to geopaparazzi-u.
Hi Dotzo,
sorry for the very late reply.
This is a quite challenging  question. We have been interested in creating the possibility to attach an external GPS to SMASH in the past.
The thing is that the few receivers we tested didn't really make things better against the device GPS, but then we didn't try high level gps'.

Since interestingly enough there has never been interest in funding such an effort (also not in geopaparazzi) in the last 15 years, I came to think that in fact professionals never use custom apps for professional use.

I assume that there is also the proprietary barrier. I.e. we could implement a bluetooth connected GPS that reads NMEA sentences, but the good receivers make their magic most of the time when using their proprietary protocols. Protocols that often are even with open specs. But when we tried to approach companies, they are not willing to supply hardware. Also which one to choose? 

So yes, this is a tricky thing. And also a complex one. And no one ever wants to fund it.
And mocking the GPS on Android has changed and will not always work.
So it is a bit of a mess :-) 
Sorry for not being of more help here.

Cheers,
Andrea

 

Thanks and regards,

Dotzo 

--
You received this message because you are subscribed to the Google Groups "geopaparazzi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-us...@googlegroups.com.

Dotzo Dotzov

unread,
Aug 24, 2021, 4:15:54 AM8/24/21
to geopapara...@googlegroups.com
Hi Andrea, 

Thanks for looking into this. There has been some progress since I wrote my question, but I forgot to send an update. I contacted the developer of the Mock Location app "GPS Connector". So it turned out that there is a problem between the app and my phone - Samsung Note 10+. He fixed the problem and now I can use the Mock Location inside SMASH and it is stable. Since GPS Connector supports connection to external receivers by USB, Bluetooth, etc., maybe you can use even higher-end receivers.

If I get a chance to test one of these I will update you here.

Best regards,

Dotzo 

andrea antonello

unread,
Aug 24, 2021, 5:16:24 AM8/24/21
to geopaparazzi-u.
Hi Dotzo,

Thanks for looking into this. There has been some progress since I wrote my question, but I forgot to send an update. I contacted the developer of the Mock Location app "GPS Connector". So it turned out that there is a problem between the app and my phone - Samsung Note 10+. He fixed the problem and now I can use the Mock Location inside SMASH and it is stable. Since GPS Connector supports connection to external receivers by USB, Bluetooth, etc., maybe you can use even higher-end receivers.

If I get a chance to test one of these I will update you here.

that is actually great news, thanks!
Cheers,
Andrea

 
Reply all
Reply to author
Forward
0 new messages