GeoLocation bug in Android

fuse 1.2.1 (13974)

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

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

My code is:

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

How can I solve this?

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?

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

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

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

With this code I don’t get never the geolocation :frowning:
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

<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>

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.

Thanks!

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 ?

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 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.

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
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

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