Baseflow / Baseflow/flutter-geolocator

Why Location retrieving doesn't work without internet or wifi on adroid?

Open
#1,758 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
1.3k
Forks
803
Avg merge
8h 16m
Merged PRs (30d)
1

Description

### Please check the following before submitting a new issue.

- [x] I have searched the [existing issues](https://github.com/baseflow/flutter-geolocator/issues).
- [x] I have carefully [read the documentation](https://github.com/baseflow/flutter-geolocator/blob/main/geolocator/README.md).

### Please select for which platform(s) you need help

- [x] Android
- [ ] iOS
- [ ] Linux
- [ ] macOS
- [ ] Web
- [ ] Windows

### Your question

Location retrieving doesn't work without internet or cellular data on adroid. when I get the location once or if I had the wifi and location turned on together then turned off wifi it works, but if from the beginning I turned on location while wifi is off it never works

Actual results:
location turned on together then turned off wifi it works, but if from the beginning I turned on location while wifi is off it never works

Expected results:
Want to lat and long when i turn off and on location on my phone while wifi is off.

Code sample:

```
_positionStreamSubscription = Geolocator.getPositionStream(
locationSettings: locationSettings,
).
```
```
final locationSettings = AndroidSettings(
accuracy: LocationAccuracy.best,
distanceFilter: 0,
forceLocationManager: true,
);

```

Version
geolocator: ^13.0.2

Flutter Version:
- Flutter 3.32.5 • channel stable • https://github.com/flutter/flutter.git
- Framework • revision fcf2c11572 (5 months ago) • 2025-06-24 11:44:07 -0700
- Engine • revision dd93de6fb1 (5 months ago) • 2025-06-24 07:39:37 -0700
- Tools • Dart 3.8.1 • DevTools 2.45.1

### Version

13.0.2

Contributor guide

Open the contributing guide

Research direction

The payload names no files or tests; start at the getPositionStream call and its AndroidSettings configuration. Reproduce on Android with Wi-Fi and cellular data disabled, then trace the location-provider behavior. Done means the offline failure is explained and the stated location-update expectation is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.