xamarin / Essentials

Xamarin.Essentials is no longer supported. Migrate your apps to .NET MAUI, which includes Maui.Essentials.
https://aka.ms/xamarin-upgrade
Other
1.53k stars 505 forks source link

Step Counter API #362

Closed nicolgit closed 1 year ago

nicolgit commented 6 years ago

Description

Implements an API that allows to interact with integrated Step Counter when available in order to have:

API

public class StepCounter
{
    bool IsMonitoring { get; private set; }
    void Start();
    void Stop();
    event StepCounterChangedEventHandler ReadingChanged;
}

Struct StepCounterChangedEventHandler

    public class StepCounterChangedEventHandler : EventArgs
    {
        DateTimeOffset Timestamp {get; private set}; // time of the most recent pedometer reading
        int TotalSteps {get; private set}; 
    }

Implementation

VS bug #735664

jamesmontemagno commented 6 years ago

Considerations here is that they would be only when the app is open and is not for background tracking. On Android that would require a service.

SatyaRamprasad commented 5 years ago

@jamesmontemagno Any updates on this feature request(background tracking)

jrahma commented 4 years ago

It will be great if you link it to the Location API in Xamarin Essentials to return the current location too

Happypig375 commented 4 years ago

It would be great if Xamarin.Essentials has all sensors built-in, especially the pedometer.

sanjeevmajgotra commented 3 years ago

any update on this? if not then is there any logic using existing apis we can use to accurately detect motion?

jamesmontemagno commented 3 years ago

Take a look at Shiny -> https://github.com/shinyorg/shiny it is included in here.

jfversluis commented 1 year ago

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.

Happypig375 commented 1 year ago

@jfversluis Ok then will .NET MAUI essentials have it

Happypig375 commented 1 year ago

I can't believe the MAUI team closes issues instead of transferring them but whatever. New issue here https://github.com/dotnet/maui/issues/16712