How to get user location with Expo

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024

Комментарии • 37

  • @ajeddigfaris9971
    @ajeddigfaris9971 4 года назад +49

    Hello, imports have been updated, it's now
    import * as Permissions from 'expo-permissions';
    import * as Location from 'expo-location';
    instead of
    import { Permissions, Location } from 'expo';
    Thank's for your tutorial !

  • @mehdirabia1036
    @mehdirabia1036 4 года назад +2

    Hello Paul , thanks for this video ..can you please tell me how to display this location in a mapView

  • @BruceLane
    @BruceLane 5 лет назад +1

    I'm interested in a video about Firebase in the context of React Native(Cloud Messaging mostly, but Realtime database, etc would be nice). Thank you!

  • @theo170296
    @theo170296 5 лет назад +1

    You saved my life bro !

  • @talalghauri9504
    @talalghauri9504 2 года назад

    thanks, saved my time but imports have been updated also

  • @alexalvaltroz9743
    @alexalvaltroz9743 3 года назад

    Hi, do you have an idea how to get the direction ? .. in your case the heading value is "-1"

  • @erreerre2001
    @erreerre2001 5 лет назад +1

    Hey Paul! Will you upgrade your great videos on udemy for Ionic 4? Thanks

    • @paulhalliday
      @paulhalliday  5 лет назад +1

      I've got a lot of Ionic 4 content coming in the near future!

  • @devorrahtester5439
    @devorrahtester5439 5 лет назад

    Hi Paul. Are you excited about Flutter?

    • @paulhalliday
      @paulhalliday  5 лет назад +1

      Absolutely. Once I get IonicWorkshop and Learn Ionic 4 From Scratch off the ground, I'm looking forward to getting a Flutter app out on the store.

  • @bhad7787
    @bhad7787 5 лет назад

    The location you got was San Fransisco. So does that mean while testing the location will always be San Fransisco because thats where they are based, but once you build the app and it actually runs on a phone the location will be the users real location?

    • @paulhalliday
      @paulhalliday  5 лет назад +1

      That’s correct. My emulator’s location is set to San Fransisco. :)

  • @bansiparmar3879
    @bansiparmar3879 3 года назад

    hello..i have try this code but syntaxError occur semi colol missing in componentWillMount() can you halp me ...?

  • @yloibx
    @yloibx 2 года назад

    how we show the current location in mapview?

  • @waltermonteiro7078
    @waltermonteiro7078 4 года назад

    I got a error when executing this code: "[Unhandled promise rejection: Error: Location provider is unavailable. Make sure that location services are enabled.]"
    What do i do?

  • @herveVeve
    @herveVeve 5 лет назад

    Hello, what do you use to simulate the smartphone on the right side?

    • @paulhalliday
      @paulhalliday  5 лет назад +1

      That's the iPhone emulator within Xcode. It's simply attached to the right side of the screen. :)

    • @herveVeve
      @herveVeve 5 лет назад

      @@paulhalliday Thank you.

  • @EltigreTafur
    @EltigreTafur 4 года назад

    y como se puede obtener solo la latitude y longitude

  • @chloecourrier2565
    @chloecourrier2565 4 года назад

    Hi ! what font type do you use on your vscode ?

    • @giji6762
      @giji6762 Год назад

      m8 why the fuck would you want to use that font are you ok??

  • @Childishbong
    @Childishbong 3 года назад

    Hey!!!!!!!!! i know im a year late. But what if i want to get the location as a link to send to someone

  • @mohiniraut14
    @mohiniraut14 4 года назад

    Sir i am facing error Possible Unhandled Promise Rejection (id :2):TypeError :Undefined is not an Object(evaluating '_expoPermissions.defaultAsync')

    • @abhijithj2366
      @abhijithj2366 4 года назад

      I am facing the same error. Did you get any solns?

    • @saylilad1261
      @saylilad1261 3 года назад

      hey getting the same errors for Async section of code did anyone figure it out yet?

    • @bijay4victory
      @bijay4victory 3 года назад

      Having the same error .

    • @ashikhp1675
      @ashikhp1675 3 года назад

      @@bijay4victory did you using expo?

    • @alan.torres
      @alan.torres 2 года назад

      This is what fixed for me: I had to first use the new imports that Ajeddig F. commented above (had to install those via npm). Then I changed where it said 'const {status} = await Permissions.askAsync.....' and changed to it 'const { status } = await Location.requestForegroundPermissionsAsync();

  • @aniketnagapure2554
    @aniketnagapure2554 4 года назад

    How do i convert longitude and lat to street address?

  • @lahouassamohamed1074
    @lahouassamohamed1074 5 лет назад

    thank's broo