Open torian257x opened 3 years ago
just doesn't seem to work.
solution could be for me to switch plugins - this one works after following the steps I outlined: https://github.com/Lyokone/flutterlocation/issues/502
notice: doing the same steps for the plugin of this repo, doesn't work.
This might be a permissions issue. If you go to Settings > Location > Give your app the 'Allow all the time' permission. You could reach the permissions by going through the App's settings page too.
Like I mentioned in #184, its possibly due to the permission request not working as desired.
I tried just doing that right now. Doesnt work either. I tried flipping it on and off a couple times (the service).
Launching lib/main.dart on Redmi Note 7 in debug mode...
Running Gradle task 'assembleDebug'...
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
Waiting for Redmi Note 7 to report its views...
Debug service listening on ws://127.0.0.1:36943/3m-NhS40qys=/ws
Syncing files to device Redmi Note 7...
I/flutter (28554): Initializing...
W/le.locatortest(28554): Accessing hidden method Lsun/misc/Unsafe;->getUnsafe()Lsun/misc/Unsafe; (greylist,core-platform-api, linking, allowed)
W/le.locatortest(28554): Accessing hidden method Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J (greylist,core-platform-api, linking, allowed)
W/le.locatortest(28554): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
W/le.locatortest(28554): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
I/flutter (28554): Initialization done
I/flutter (28554): Running false
D/BackgroundLocatorPlugin(28554): start locator with Google client
D/BackgroundLocatorPlugin(28554): Locator service is not running, nothing to stop
D/BackgroundLocatorPlugin(28554): start locator with Google client
D/BackgroundLocatorPlugin(28554): Locator service is not running, nothing to stop
W/ActivityThread(28554): SCHED: com.example.locatortest1/.MainActivity [88, r=358ms, a=48ms, w=74717ms]
D/BackgroundLocatorPlugin(28554): Locator service is not running, nothing to stop
D/BackgroundLocatorPlugin(28554): start locator with Google client
D/BackgroundLocatorPlugin(28554): Locator service is not running, nothing to stop
W/ActivityThread(28554): SCHED: com.example.locatortest1/.MainActivity [91, r=149ms, a=13ms, w=20670ms]
Lost connection to device.
Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
Same error! inside api call not happens.
I copied your example over along with the extra files and packages needed to fix all errors from https://github.com/rekab-app/background_locator/tree/master/example/lib
problem is that no entries appear in
Last run: ?
Status: is running
I thought maybe something is off with my gps / location settings but if I enable mock locations https://play.google.com/store/apps/details?id=ru.gavrikov.mocklocations&hl=en&gl=US I am able to see that my gps signal moves on a path (I check in google maps) no updates anyway
btw I feel like, to enable the request permission in debug, I had to change my debug manifest to this:
If I left it like you had in the example, it wouldn't receive permission for location updates I think. There would just be no popup to give permission. After updating this manifest, and running
flutter clean
and redeploy the app, the popup did come.here is my output:
once I press stop I receive: