3

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 Answers1

-1

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.

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/31337521) – tomerpacific Mar 27 '22 at 05:27