Created
November 20, 2022 17:06
-
-
Save bbenetskyy/67945632b9f8e1627d002d0a2ee21c90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using LocationUpdates.Models; | |
namespace LocationUpdates.Services; | |
public partial class LocationService | |
{ | |
public event EventHandler<LocationModel> LocationChanged; | |
public event EventHandler<string> StatusChanged; | |
public void Initialize() | |
{ | |
#if ANDROID | |
AndroidInitialize(); | |
#elif IOS | |
IosInitialize(); | |
#endif | |
} | |
public void Stop() | |
{ | |
#if ANDROID | |
AndroidStop(); | |
#elif IOS | |
IosStop(); | |
#endif | |
} | |
protected virtual void OnLocationChanged(LocationModel e) | |
{ | |
LocationChanged?.Invoke(this, e); | |
} | |
protected virtual void OnStatusChanged(string e) | |
{ | |
StatusChanged?.Invoke(this, e); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment