Unity - Location Kit - onLocationAvailability method returning false for every time

96 Views Asked by At

Unity - Location Kit - onLocationAvailability method returning false for every time.

In the OnLocationCallback methods, onLocationAvailability method returning false.

 public override void onLocationAvailability(LocationAvailability arg0) {
            Debug.Log("HMS onLocationAvailability 0--->"+arg0);
        }

So, In what case, onLocationAvailability returning false?.

1

There are 1 best solutions below

0
On

enter image description here

As per the log snippet above, the errorCode: 701200010 , will return if GPS was unable to get location on that position. If you insert SIM card in your phone, then the location will come at the same position where you are sitting, it seems when you are connecting to Wi-Fi, GPS signal was weak when you will be moving from here and there, GPS signal will catch and you will be getting a location.

But at the same time when you were connected with cellular network for getting GPS, that will work at the same position. It depends on the GPS availability of your device position . And also I observed in logs that the vendor country is unknown for your device and that is why on your current position where you were sitting, it is unable to catch location .

enter image description here

To solve your problem you need to move away from your current position with device, then you will be able to catch current GPS location.