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

Unable to get location after disable then enable of gps!! #82

Closed
dadmad817 opened this issue Oct 5, 2018 · 8 comments
Closed

Unable to get location after disable then enable of gps!! #82

dadmad817 opened this issue Oct 5, 2018 · 8 comments

Comments

@dadmad817
Copy link

first: the user allows permissions for the application and the gps is turned previosly
second:the user turns off the gps
third:the user tries to get his location but an error appears in the dubug console
fourth: the user enables the gps back
fifth: the user tries to get the location again but the error reappears even if everything is enabled
testing on samsung s7 verizon android 8.0
any help appreciated
code of error:

E/flutter (31861): [ERROR:flutter/shell/common/shell.cc(181)] Dart Error: Unhandled exception:
E/flutter (31861): PlatformException(ERROR, Failed to get location., null)
E/flutter (31861): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:551)
E/flutter (31861): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:279)
E/flutter (31861):
E/flutter (31861): #2 Location.getLocation (package:location/location.dart:12)
E/flutter (31861): #3 SubmitState.build. (package:doctorradar/pages/doctorsarea.dart:1735)
E/flutter (31861):
E/flutter (31861): #4 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:503)
E/flutter (31861): #5 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:558)
E/flutter (31861): #6 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102)
E/flutter (31861): #7 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:242)
E/flutter (31861): #8 TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:204)
E/flutter (31861): #9 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156)
E/flutter (31861): #10 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:147)
E/flutter (31861): #11 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:121)
E/flutter (31861): #12 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:101)
E/flutter (31861): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:64)
E/flutter (31861): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:48)
E/flutter (31861): #15 _invoke1 (dart:ui/hooks.dart:142)
E/flutter (31861): #16 _dispatchPointerDataPacket (dart:ui/hooks.dart:99)

@ibrierley
Copy link

(Sorry posted before under wrong account). This happens to me unless I'm running something like Google maps which has already enabled location.

@vortixhead
Copy link

Same here

@MustafaProgramer
Copy link

same here, any solution?

@josep-albert-bonarea
Copy link

Same here with latest version of flutter and latest version plugin

@chaituwaichal
Copy link

Any updates or solutions?

@OddBlueDog
Copy link

Same here. Is anyone still updating this plugin?

@Lyokone
Copy link
Owner

Lyokone commented Mar 16, 2019

Hey ! it should be working with 2.1, I'll try to add a getter for the GPS status as well in next versions. Let me know if its fixed for you.

@Lyokone Lyokone closed this as completed Mar 16, 2019
@tolotrasamuel
Copy link
Contributor

@Lyokone It does not work on 2.1 If the GPS is off:

I/flutter ( 2767): Permission: true
I/flutter ( 2767): PlatformException(ERROR, Failed to get location., null)

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

No branches or pull requests

9 participants