1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 09:13:15 +00:00

Added custom device info service for determining model and version (ios = major version, android = API level).

This commit is contained in:
Kyle Spearrin
2016-08-23 22:43:17 -04:00
parent e5f3be9669
commit 043a4122b4
16 changed files with 664 additions and 156 deletions

View File

@@ -1,6 +1,6 @@
using Bit.App.Abstractions;
using Plugin.DeviceInfo.Abstractions;
using PushNotification.Plugin.Abstractions;
using Xamarin.Forms;
namespace Bit.App.Models.Api
{
@@ -8,11 +8,11 @@ namespace Bit.App.Models.Api
{
public DeviceRequest() { }
public DeviceRequest(IAppIdService appIdService, IDeviceInfo deviceInfo)
public DeviceRequest(IAppIdService appIdService, IDeviceInfoService deviceInfoService)
{
Identifier = appIdService.AppId;
Name = deviceInfo.Model;
Type = deviceInfo.Platform == Platform.Android ? DeviceType.Android : DeviceType.iOS;
Name = deviceInfoService.Model;
Type = Device.OS == TargetPlatform.Android ? DeviceType.Android : DeviceType.iOS;
}
public DeviceType Type { get; set; }