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

23 lines
747 B
C#
Raw Normal View History

2024-04-09 12:53:23 +02:00
using ShareeBike.Model.Device;
2021-11-07 19:42:59 +01:00
using Xamarin.Essentials;
using Xamarin.Forms;
2024-04-09 12:53:23 +02:00
[assembly: Dependency(typeof(ShareeBike.Droid.Model.Device.Device))]
namespace ShareeBike.Droid.Model.Device
2021-11-07 19:42:59 +01:00
{
2022-09-06 16:08:19 +02:00
public class Device : ISmartDevice
{
public string Manufacturer => DeviceInfo.Manufacturer;
2021-11-07 19:42:59 +01:00
2022-09-06 16:08:19 +02:00
public string Model => DeviceInfo.Model;
2021-11-07 19:42:59 +01:00
2022-09-06 16:08:19 +02:00
public DevicePlatform Platform => DeviceInfo.Platform;
2021-11-07 19:42:59 +01:00
2022-09-06 16:08:19 +02:00
public string VersionText => DeviceInfo.VersionString;
2021-11-07 19:42:59 +01: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-11-07 19:42:59 +01:00
}