Activity Recognition in Background using Flutter

970 Views Asked by At

I want to implement activity recognition in background that means if user close the application even then it'll listening the activity recognition states whether it is in IN VEHICLE, STILL or in which state.

I already tried activity_recognition_flutter: ^4.2.0 package to implement this -> Everything is working fine except in background it is not working when I close the application.I want to implement it in Android & iOS both and my current focus is Android primarily.

Can anyone guide with his/her experience if he/she knows how to do it. Thank you !

1

There are 1 best solutions below

1
normnd.akbr On

Have you try passing BLoC events to flutter background? The idea is you can devine events in your BLoC and let flutter background do the job equals to what events it helds.