-
Notifications
You must be signed in to change notification settings - Fork 6
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
Using flutter_blue together with android-long-task leads to a PlatformException #2
Comments
I have the same issue while testing the plugin on my side with Location plugin.
The crash log when I call Location().hasPermission()
I think such a plugins needs to be registered again for the foreground service, because probably runs in another isolate. Then in my activity I can register such a plugins :
On flutter_workmanager they have even a way that auto register all plugins on android |
I have tried to manually register location package from the foreground service, but this is not the case. I can see a log message that this plugin is already registered for this FlutterEngine, so my comment above is invalid and you don't need to register any external plugins. @easazade , probably this is the problem with your plugin too? |
With https://github.com/Baseflow/flutter-geolocator I can get locations and everything works great. So I confirm the problem is with Location plugin, which apparently needs an activity to work |
accessing location on background and foreground is different. and I mean natively different and you should use a different library for that |
Hey @easazade ,
I'm trying to use your package to download files from a BLE device in the background. It runs fine so far. However, I receive the following exception when I try to run any function from flutter_blue https://pub.dev/packages/flutter_blue
As soon as I try to run my initialization function for the BLEManager
I get the following exception:
Any idea what's going wrong?
best regards and thanks for the nice plugin!
The text was updated successfully, but these errors were encountered: