Esempio n. 1
0
 public DeviceInfo GetDeviceInfo()
 {
     if (DeviceInfo == null)
     {
         var easClientDeviceInformation = new EasClientDeviceInformation();
         DeviceInfo = new DeviceInfo
         {
             ClientSdk                = GetClientSdk(),
             HardwareId               = UtilUap.GetHardwareId(),
             NetworkAdapterId         = UtilUap.GetNetworkAdapterId(),
             AppDisplayName           = UtilUap.GetAppDisplayName(),
             AppVersion               = UtilUap.GetAppVersion(),
             AppPublisher             = UtilUap.GetAppPublisher(),
             DeviceType               = UtilUap.GetDeviceType(),
             DeviceManufacturer       = UtilUap.GetDeviceManufacturer(),
             Architecture             = UtilUap.GetArchitecture(),
             OsName                   = GetOsName(),
             OsVersion                = UtilUap.GetOsVersion(),
             Language                 = UtilUap.GetLanguage(),
             Country                  = UtilUap.GetCountry(),
             ReadWindowsAdvertisingId = ReadWindowsAdvertisingId,
             EasFriendlyName          = UtilUap.ExceptionWrap(() => easClientDeviceInformation.FriendlyName),
             EasId = UtilUap.ExceptionWrap(() => easClientDeviceInformation.Id.ToString()),
             EasOperatingSystem       = UtilUap.ExceptionWrap(() => easClientDeviceInformation.OperatingSystem),
             EasSystemFirmwareVersion = UtilUap.ExceptionWrap(() => easClientDeviceInformation.SystemFirmwareVersion),
             EasSystemHardwareVersion = UtilUap.ExceptionWrap(() => easClientDeviceInformation.SystemHardwareVersion),
             EasSystemManufacturer    = UtilUap.ExceptionWrap(() => easClientDeviceInformation.SystemManufacturer),
             EasSystemProductName     = UtilUap.ExceptionWrap(() => easClientDeviceInformation.SystemProductName),
             EasSystemSku             = UtilUap.ExceptionWrap(() => easClientDeviceInformation.SystemSku),
         };
     }
     return(DeviceInfo);
 }
Esempio n. 2
0
 public string ReadWindowsAdvertisingId()
 {
     return(UtilUap.GetAdvertisingId());
 }
Esempio n. 3
0
 public void LauchDeeplink(Uri deepLinkUri)
 {
     UtilUap.runInForeground(Dispatcher, () => Windows.System.Launcher.LaunchUriAsync(deepLinkUri));
 }
Esempio n. 4
0
 public void Sleep(int milliseconds)
 {
     UtilUap.SleepAsync(milliseconds).Wait();
 }
Esempio n. 5
0
 public void RunAttributionChanged(Action <AdjustAttribution> attributionChanged, AdjustAttribution adjustAttribution)
 {
     UtilUap.runInForeground(Dispatcher, () => attributionChanged(adjustAttribution));
 }
Esempio n. 6
0
 public Task LauchDeeplink(Uri deepLinkUri, Task previousTask = null)
 {
     return(UtilUap.RunInForeground(_dispatcher, () => Windows.System.Launcher.LaunchUriAsync(deepLinkUri), previousTask));
 }
Esempio n. 7
0
 public Task RunActionInForeground(Action action, Task previousTask = null)
 {
     return(UtilUap.RunInForeground(_dispatcher, () => action(), previousTask));
 }