sharee.bike-App/TINK/TINK.Android/Model/Device/Device.cs

23 lines
796 B
C#
Raw Normal View History

2021-05-13 20:16:41 +02:00
using TINK.Model.Device;
2021-06-26 20:57:55 +02:00
using Xamarin.Essentials;
2021-05-13 20:16:41 +02:00
using Xamarin.Forms;
[assembly: Dependency(typeof(TINK.Droid.Model.Device.Device))]
namespace TINK.Droid.Model.Device
{
2021-06-26 20:57:55 +02:00
public class Device : ISmartDevice
2021-05-13 20:16:41 +02:00
{
2021-06-26 20:57:55 +02:00
public string Manufacturer => DeviceInfo.Manufacturer;
public string Model => DeviceInfo.Model;
public string PlatformText => DeviceInfo.Platform.ToString();
public string VersionText => DeviceInfo.VersionString;
2021-05-13 20:16:41 +02:00
/// <summary> Gets unitque device identifier. </summary>
/// <returns>Gets the identifies specifying device.</returns>
2021-06-26 20:57:55 +02:00
public string Identifier
=> Android.Provider.Settings.Secure.GetString(Android.App.Application.Context.ContentResolver, Android.Provider.Settings.Secure.AndroidId);
2021-05-13 20:16:41 +02:00
}
}