Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

[Enhancement] ActivityRecognition APIs

Open nexxuno opened this issue 5 years ago • 4 comments

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.

nexxuno avatar Dec 15 '19 12:12 nexxuno

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.

jamesmontemagno avatar Dec 15 '19 21:12 jamesmontemagno

So it could be implemented mixing sensors data and location data but I guess it would become too complicated.

nexxuno avatar Dec 15 '19 22:12 nexxuno

Up

AndreiZachi avatar Sep 21 '21 08:09 AndreiZachi

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.

pasha-o avatar Dec 29 '21 22:12 pasha-o

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.

jfversluis avatar Aug 16 '23 14:08 jfversluis