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

23 lines
729 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
{
2022-09-06 16:08:19 +02:00
public class Device : ISmartDevice
{
public string Manufacturer => DeviceInfo.Manufacturer;
2021-06-26 20:57:55 +02:00
2022-09-06 16:08:19 +02:00
public string Model => DeviceInfo.Model;
2021-06-26 20:57:55 +02:00
2022-09-06 16:08:19 +02:00
public DevicePlatform Platform => DeviceInfo.Platform;
2021-06-26 20:57:55 +02:00
2022-09-06 16:08:19 +02:00
public string VersionText => DeviceInfo.VersionString;
2021-06-26 20:57:55 +02:00
2022-09-06 16:08:19 +02:00
/// <summary> Gets unitque device identifier. </summary>
/// <returns>Gets the identifies specifying device.</returns>
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
}