flutter_geofence
flutter_geofence copied to clipboard
Unable to run example on Android
Hi! I tried integrating this in my app, with no luck: I would never get an error, but the callback was also never triggered.
I then tried to run the example on an Android emulator and here is the result: Android 9:
- I can get the location of the user
- I can ask for permission
- When I add a geofence I get this in the console:
I/flutter ( 6496): great success
D/DC ( 6496): something not ok
Android 10:
- I can ask for permission
- I cannot get the location of the user (nothing happens when I ask for it, no error either)
- When I add a geofence it tells me that it was added:
D/DC ( 5404): added them
But then, in both cases, the callback of entering/exiting a location is never called.
Is there any more info I can provide you to diagnose the problem?
Here is my flutter doctor output:
05:30:21 savy91@savy91-desktop caricami → flutter doctor -v
[✓] Flutter (Channel dev, 1.19.0-0.0.pre, on Linux, locale it_IT.UTF-8)
• Flutter version 1.19.0-0.0.pre at /home/savy91/development/flutter
• Framework revision a849daf283 (8 days ago), 2020-05-07 18:59:02 -0700
• Engine revision 3953c3ccd1
• Dart version 2.9.0 (build 2.9.0-5.0.dev 4da5b40fb6)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /home/savy91/Android/Sdk
• Platform android-29, build-tools 29.0.2
• ANDROID_SDK_ROOT = /home/savy91/Android/Sdk
• Java binary at: /home/savy91/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6453388/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[!] Android Studio (version 4.0)
• Android Studio at /home/savy91/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6453388
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (3 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• Web Server • web-server • web-javascript • Flutter Tools
• Chrome • chrome • web-javascript • Google Chrome 81.0.4044.138
@savy-91 hello sir , when you fired this one then what will output because when i was gitting this no location is printed in my console any idea ?
Geofence.getCurrentLocation().then((coordinate) {
print("great user location");
print("great got latitude: ${coordinate.latitude} and longitude: ${coordinate.longitude}");
});
I have this problem too. Android 11 pixel 4xl.