Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Bug Summary #497

Open
dionis-takac opened this issue Sep 12, 2020 · 0 comments
Open

🐞 Bug Summary #497

dionis-takac opened this issue Sep 12, 2020 · 0 comments
Labels

Comments

@dionis-takac
Copy link

Configuration

  • SDK Version 9.3.0
  • Android OS Version 8.0.0
  • Device model(s): Samsung
  • App: Mapbox

When I try to enable GPS on my device using enableLocationComponent() from your official code sample, I am getting error that last location is null and GPS is not enabled on my device.

Here is the code:

@SuppressLint("MissingPermission")
    private void initLocationEngine() {
        locationEngine = LocationEngineProvider.getBestLocationEngine(this);

        LocationEngineRequest request = new LocationEngineRequest.Builder(DEFAULT_INTERVAL_IN_MILLISECONDS)
                .setPriority(LocationEngineRequest.PRIORITY_BALANCED_POWER_ACCURACY)
                .setMaxWaitTime(DEFAULT_MAX_WAIT_TIME).build();

        locationEngine.requestLocationUpdates(request, callback, getMainLooper());
        locationEngine.getLastLocation(callback);
    }

I read some issues opened for this, but I haven't found solution. Could you help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant