SmartZoos / Toolset

Gaming platform for SmartZoos project
MIT License
0 stars 1 forks source link

"GPS signal lost" warning does not show during gameplay #135

Open PatriciaMoller opened 7 years ago

PatriciaMoller commented 7 years ago

The warning message saying there's no GPS Signal does not show after the game has started. (I was told by @kaimikael there was supposed to be one.) I tried turning off the GPS, but no message showed. screenshot_20170906-133429screenshot_20170906-133431

pjotrsavitski commented 7 years ago

That is not a GPS signal loss check, but one for loss of location services data. The phone would fall back to other means of determining location once GPS is off. I could check it out later, but it was working well once I forced location services off at some point in time.

PatriciaMoller commented 7 years ago

I just remembered and don't think I made an issue about it back then. While we were testing back in ~May, some of the testers lost network connection during play, which led to them not being able to submit answers. Since approximate location can be checked by network, I turned off my Wifi+mobile data+GPS, as well as Airplane mode. No warning showed up for me, it just looked the same as above.

pjotrsavitski commented 7 years ago

Ok. I would then have to check that out with my own device. That would take some time as this is not the most pressing issue.

pjotrsavitski commented 7 years ago

Checked that by disabling the location services on my phone (iOS). The red bar appeared almost instantaneously.

PatriciaMoller commented 7 years ago

I still can't see it. I tried to let the game load, then via settings revoke the browser's permission to access location. But that just seems to force a refresh on the page, getting me to the loading screen, and I'm to enable access in order to get into the game again.

If I remember correctly, Kai uses an Android too, but it didn't show there either. Had you been using an Android emulator? Does it work there?

Could you post a screencap of how it looks on your phone?

pjotrsavitski commented 7 years ago

It seems to behave inconsistently, even on same device. I suppose it would need more code to apply additional checks.

The code itself works, the issue seems to be with how API is behaving. It does not return the information about signal being lost (at times) or does not return the new location data, once it goes back.

It might be needed to add a logic that would check for when was the last location data received and show that element a longer period of time has passed.

I will have to attach the phone to my computer to check that out. Using emulator is also possible, but it still has some limitations.

All in all, the location API does not always behaves according to the logic described. The OS has internals that could have a serious impact on that.