Search Unity

GPS not working the same in every device (android-ios)

Discussion in 'Scripting' started by Dalmar, Jan 26, 2018.

  1. Dalmar

    Dalmar

    Joined:
    Aug 5, 2013
    Posts:
    14
    Hello!

    I am using GPS on one of my projects and I'm having some problems.

    First of all my device is a Xiaomi 4X and my friend's device is a Samsung ON5.

    I'm using MAPBOX. I'm using LocationService.Start.

    When I use LocationService.isEnabledByUser:

    On my device the return is true IF my gps is on AND IF my gps if off On my friend device return is true IF gps is on AND return is false if gps is OFF

    LocationServiceStatus is: On my device: always STOPPED.

    The map of map box AND GPS WORK (i can track position) is load : On my device: mapbox load every time and I can track position, with gps on or off and LocationServiceStatus being stopped. the map will load everytime

    On my friend's device: only with gps on. When gps is off the map will not load and I cant track position.

    Can you help me? Why in my device the map is loaded and I can track position on my device when gps is off???

    The gps work different in different devices?

    I am really confused about it.
     
  2. Dalmar

    Dalmar

    Joined:
    Aug 5, 2013
    Posts:
    14
    Anyone?
     
  3. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    Hi Dalmar,

    I use the native Unity location API in my asset GO Map and I haven't received feedbacks about GPS not working on some devices.
    I don't know which Unity version are you using but I remember of some Unity 5.x that had a bug on GPS on Android devices.
    Bye
    Alan