Essentials
Essentials copied to clipboard
[Enhancement] ActivityRecognition APIs
Summary
API users should be able to understand if the end user is walking, driving, standing still. Both android and ios already have APIs for this.
API Changes
The simplest API would be an extension of the Location class: Location.CurrentActivity
where CurrentActivity is an enum: Still, Walking, Cycling, Driving, Running
Optionally an ActivityChanged event could be added together with StartListeningActivityChanged and StopListeningActivityChanged.
Platforms API: https://developers.google.com/android/reference/com/google/android/gms/location/DetectedActivity
https://developer.apple.com/documentation/coremotion/cmmotionactivity
Intended Use Case
Any scenario where coders need to understand the kind of activity that is going on.
I really like this, except Android required Google Play Services packages to be brought in and we don't want to take dependencies on that.
So it could be implemented mixing sensors data and location data but I guess it would become too complicated.
Up
Hello @jamesmontemagno, curious to know if this will be completed at some point? There are also a bunch of new permissions that need to be added for Android 12.
I think at this point it's safe to say that this won't be making it's way into Xamarin.Essentials anymore. Keep your eye on .NET MAUI for all new development! Thanks for all input and efforts here.