question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

locationChanged never runs

See original GitHub issue

Hello.

I have added mad-location-manager to my Gradle build as well as Android manifest and have implemented LocationServiceInterface within my application. Inside my Fragment’s onCreate method I run the following code:

ServicesHelper.getLocationService(getActivity(), value -> {

            if (value.IsRunning()){
                return;
            }
            value.stop();
            KalmanLocationService.Settings settings =
                    new KalmanLocationService.Settings(Utils.ACCELEROMETER_DEFAULT_DEVIATION,
                            Utils.GPS_MIN_DISTANCE,
                            Utils.GPS_MIN_TIME,
                            Utils.GEOHASH_DEFAULT_PREC,
                            Utils.GEOHASH_DEFAULT_MIN_POINT_COUNT,
                            Utils.SENSOR_DEFAULT_FREQ_HZ,
                            null, false);

            value.reset(settings);
            value.start();

            Log.d("MAD", Boolean.toString(value.IsRunning()));
        });

This returns “False” in my LogCat, indicating that even though I ‘start’ the service it never actually stops running. I have overridden locationChanged() in my Fragment as well to simply log the new latitudes and longitudes but no matter how much walking around I do with the phone this function never runs.

What could be preventing my KalmanLocationService from starting?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
dgaenkocommented, Aug 20, 2018

Спасибо за Ваш труд! Очень интересный проект, но, честно говоря, я так и не понял метода интеграции в свое приложение. Можно совсем коротенький пример для пустого проекта - только интеграция сервиса и получение откорректированных координат (без MVP, плиз). Заранее премного благодарен.

0reactions
Lezh1kcommented, Aug 20, 2018

Honestly it needs to be checked. We don’t use FusedLocationManager because of issues with play market on some old phones. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blazor LocationChanged stops navigation? - Stack Overflow
I have registered a LocationChanged event which does some stuff: ... in the browser changes but OnInitialized doesn't run for the new url....
Read more >
OnLocationChanged is never triggered · Issue #1765 - GitHub
Just to clarify OnLocationChanged should be triggered every time my current location (latitude and longitude) changes right?
Read more >
GPS_LocationChanged not executing after starting up the GPS
I was expecting GPS_LocationChanged to be called just like it did when I started up the app for the first time but that...
Read more >
LocationListener - Android Developers
This callback will never be invoked on Android Q and above. ... public abstract void onLocationChanged (Location location). Called when the location has ......
Read more >
Using aura locationChange in lightning communities
This event is automatically fired when the hash part of the URL has changed. I understand that, in my community URL, If i...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found