# GeoLocation bug in Android

**URL:** <https://forums.fusetools.com/t/geolocation-bug-in-android/1561>\
**Category:** Bug Reports\
**Created:** [September 26, 2017, 1:01pm UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561 "2017-09-26T13:01:16Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [September 26, 2017, 1:01pm UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561/1 "2017-09-26T13:01:16Z")

</div>

**fuse 1.2.1 (13974)**

In my app I’m getting the GeoLocation and in iOS work perfect but on Android I get this:

```auto
{"_events":{"newListener":{"listeners":[]},"removeListener":{"listeners":[]},"error":{"listeners":[null]},"changed":{"listeners":[null]}}}

```

My code is:

```auto
            GeoLocation.getLocation(100).then(function(location) {
			console.log(JSON.stringify(location))
	    }).catch(function(fail) {
	        //
	    });

```

How can I solve this?

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [September 26, 2017, 1:26pm UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561/2 "2017-09-26T13:26:18Z")

</div>

Could you please post a complete, minimal reproduction we could take a look at? What is the target device (manufacturer, model, OS version) you’re running this on?

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [September 26, 2017, 1:35pm UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561/3 "2017-09-26T13:35:43Z")

</div>

I test it on a Samsumg S8 plus and S8 (Android 7.0) I will try In another device now

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [September 26, 2017, 1:51pm UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561/4 "2017-09-26T13:51:52Z")

</div>

Now I test it on a Samsumg S4 (Android 5.0.1) and don’t work

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [September 26, 2017, 10:54pm UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561/5 "2017-09-26T22:54:04Z")

</div>

I’m getting `Location request timed out "Location request timed out"` Something like [https://www.fusetools.com/community/forums/bug\_reports/location\_request\_timed\_out?page=1&highlight=190529d1-3bf1-4ec4-af1b-aa3bdaf465d1#post-190529d1-3bf1-4ec4-af1b-aa3bdaf465d1](https://www.fusetools.com/community/forums/bug_reports/location_request_timed_out?page=1&highlight=190529d1-3bf1-4ec4-af1b-aa3bdaf465d1#post-190529d1-3bf1-4ec4-af1b-aa3bdaf465d1)

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [September 26, 2017, 11:07pm UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561/6 "2017-09-26T23:07:44Z")

</div>

With this code I don’t get never the geolocation ☹  
Devices: Samsumg S4 (Android 5.0.1), Samsumg S8 plus and S8 (Android 7.0)

**fuse 1.2.1 (13974)**

on the mac preview and iOS devices work fine but in my Android devices no

```auto
<App>
<JavaScript>
    var Observable = require("FuseJS/Observable");
    var GeoLocation = require("FuseJS/GeoLocation");

    var immediateLocation = Observable("");

    function GetLocation() {
        immediateLocation.value = JSON.stringify(GeoLocation.location);
    }

    module.exports = {
        immediateLocation: immediateLocation,
        GetLocation: GetLocation
    };
</JavaScript>

<StackPanel>
    <Text>Immediate:</Text>
    <Text TextWrapping="Wrap" Value="{immediateLocation}" />
    <Button Text="GET LOCATION">
        <Clicked Handler="{GetLocation}" />
    </Button>
</StackPanel>
</App>

```

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [September 27, 2017, 9:34am UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561/7 "2017-09-27T09:34:45Z")

</div>

Thanks for the reproduction! This indeed looks like the same issue as in the other forum thread.

This is now linked to the internal ticket we have on the problem, and you’ll get notified once there is some progress.

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [September 27, 2017, 1:09pm UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561/8 "2017-09-27T13:09:52Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![forza](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@forza](https://forums.fusetools.com/u/forza)\
**Post date:** [September 27, 2019, 3:08pm UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561/9 "2019-09-27T15:08:27Z")

</div>

Hello, i’ m trying to get my location with an android fone with the at the top post by @Cristian_Karmy but it is not working. Any update ?

---

<div class="post-metadata">

**Author:** ![Hassan\_M](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/hassan_m/32/957_2.png) [@Hassan\_M](https://forums.fusetools.com/u/Hassan_M)\
**Post date:** [September 28, 2019, 1:30am UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561/10 "2019-09-28T01:30:53Z")

</div>

If you are in a hurry, try using latest Fuselibs on the master branch, I see pull request has been merged about Geolocation improvement [here](https://github.com/fuse-open/fuselibs/pull/1245) about 11 days ago maybe it solve the issue. We are soon to release the latest Uno and Fuselibs versions with numbers of improvement and bug fix. Stay tuned.

---

<div class="post-metadata">

**Author:** ![forza](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@forza](https://forums.fusetools.com/u/forza)\
**Post date:** [September 29, 2019, 11:50am UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561/11 "2019-09-29T11:50:40Z")

</div>

i used fast the same code in Fuse doc and now i’m having the latitude and longitude in my android fone. In my App, when i click of a plumber icon then i can see the list of users who registered as plumber like this:  
 ![g3](https://canada1.discourse-cdn.com/flex035/uploads/fusetools1/original/1X/fa3edf22aabf225c02853ec2b15eb826e6fbb934.jpeg)  
It is possible with with GeoLocation to know in KM how far is the user based on his address and show this in the list ?.  
thanks for yours answers

---

<div class="post-metadata">

**Author:** ![Hassan\_M](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/hassan_m/32/957_2.png) [@Hassan\_M](https://forums.fusetools.com/u/Hassan_M)\
**Post date:** [September 29, 2019, 1:35pm UTC](https://forums.fusetools.com/t/geolocation-bug-in-android/1561/12 "2019-09-29T13:35:52Z")

</div>

You can try Google Service for that : [https://developers.google.com/maps/documentation/geocoding/intro](https://developers.google.com/maps/documentation/geocoding/intro)
