Skip to content

Plugin: Geolocation #121

Closed
Closed

Description

@FlutterIssues

Issue by eseidelGoogle
Wednesday Aug 05, 2015 at 19:34 GMT
Originally opened as https://github.com/flutter/engine/issues/471


Some features include:

  • geofencing (region monitoring)
  • current/last location
  • location updates
  • beacons
  • testable (mockable) APIs

Activity

  1. changed the title [-]Add a GPS/Location service for Sky[/-] [+]Add a GPS/Location service[/+] on Dec 7, 2015
  2. sethladd commented on Dec 7, 2015

    @sethladd
    Contributor

    Android location APIs from Play Services: https://developers.google.com/android/reference/com/google/android/gms/location/package-summary

    (the android.location APIs are not recommended. Android wants us to use the Play Services APIs for location)

  3. added this to the Hackathon milestone on Dec 7, 2015
  4. modified the milestones: , Hackathon on Jan 26, 2016
  5. eseidelGoogle commented on Jan 26, 2016

    @eseidelGoogle
    Contributor

    No longer in scope for the hackathon.

  6. edelvalle commented on Aug 31, 2016

    @edelvalle
    Contributor

    There is right now a simple way to ask for the last known location in Android:

    import 'dart:jni';
    
    
    final Context = Java.getClass('android.content.Context');
    final LocationManager = Java.getClass('android.location.LocationManager');
    
    
    getLastLocation() {
        final context = new JavaObject(JniApi.getApplicationContext());
        final locationManager = context.getSystemService(Context.LOCATION_SERVICE);
    
        return locationManager.getLastKnownLocation(
          LocationManager.PASSIVE_PROVIDER
        );
    }
    

    Is there an easy way to get location udpates? Because I can not create a LocationListener from Dart and pass it to Java. 😢

  7. a14n commented on Sep 2, 2016

    @a14n
    Contributor

    It is possible to access Plateform Services to request location updates. I made a little demo available at https://github.com/a14n/flutter-geolocation-demo that shows how to do that. See the Android code that forwards locations to the flutter part.

  8. sethladd commented on Dec 2, 2016

    @sethladd
    Contributor

    My understanding is that our strategy is to build out a plugin/interop layer, and then use that to allow the ecosystem (flutter team? developers?) to build a Geolocation service.

    I'm going to close this issue in the meantime. However, ensuring GPS/Geolocation can be exposed via plugins/interop is on the radar and important. We're just unlikely to deliver this specific API directly as part of Flutter.

  9. 47 remaining items

  10. NikhilJogdand commented on Aug 9, 2018

    @NikhilJogdand

    How to turn on GPS on flutter ?

  11. github-actions commented on Aug 17, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilitycustomer: mulligan (g3)packageflutter/packages repository. See also p: labels.would be a good packageSeparate Flutter package should be made for this

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions