[TUTORIAL] Very fast A-GPS location fix (with AppSupport, on Android apps): The Huawei's way

Hi Sailors,

I just wanted to share some informations here.

So A-GPS is not using the actual device’s GPS antenna, instead it uses wlan/mobile network towers and other such things to quickly get an approximate location.

Somehow i noticed that Huawei has a strong built-in functionning Agps within its apps that it distributes with its own app store named AppGallery.

Its usefull for us Sailfish’s AppSupport users to be able to have navigation apps that instantly get an approximate location i think. Therefore i wanted to share this small piece of information.

Or course all that is limited to Android apps within the AppSupport container, so there is that. Also privacy concerned folks may argue against Huawei and closed source, sure. But anyhow many people like me may find it pretty cool to have a super fast fix on an Android Navigation app on Sailfish OS.

So here is the tutorial:

1- Download the appgallery apk from within its own website and install the store:

https://appgallery.huawei.com

https://appgallery.huawei.com/app/C27162

2-Download the Petal Maps app from within the AppGallery store:

https://appgallery.huawei.com/app/C102457337

That’s it to have the Agps working pretty fine on the Petal Maps navigation app.

You can add another step which is installing the HMS Core, Huawei Mobile Services, that is Huawei’s pendant to GMS, to my testing it somehow makes available the Agps used in Petal Maps with all other android apps that can use Agps location (i tested that sucessfully on Organic Maps for exemple). The settings for this app is a little hard to find since it doesnt appear on the app grid.

So that would be:

3(optionnal)-: Install HMS Core:

https://appgallery.huawei.com/app/C10132067

Happy Testing folks!

I tested those on Xperia XA2 and 10 II with paid licence (therefore AppSupport) with quite happy success myself.

Feel free to write down your own experiences!

3 Likes

How should this work? AppSupport uses the same settings as Sailfish does, as far as i know. How did you do your tests? Did you reboot the phone between each test?

In theory they could implement in sw what gps chip does and just manually query agps supl endpoints etc and use trigonometry based on cell towers/wifi networks (except wifi is supposed not to be queried by appsupport), but I can’t get it to work, stuck in Ireland, for a few minutes now (C2)
Edit: yeah idk, are you logged in with huawei ID? Cannot reproduce the quick gps lock

I may have rebooted between tests yes, as i switch on and off my phone daily

No I didnt log in a Huawei ID. Just Petal Maps downloaded and that was it. From Appgallery (likely Petal Maps in google play store isnt the full version).

Maybe reboot the phone, or switch off and on the Android Support for the agps to get started?

I dont usually have Wlan open, so i think the Agps from Petal Maps on my Xperia 10 II mostly get location info from cellular network triangulation.