/// <summary> /// Gets the device notification. /// </summary> /// <param name="announcement">The announcement.</param> /// <param name="deviceType">Type of the device.</param> /// <returns></returns> public static IDeviceNotification GetDeviceNotification(MobileDeviceType deviceType) { IDeviceNotification deviceNotifiaction = null; try { switch (deviceType) { case MobileDeviceType.Apple: deviceNotifiaction = new AppleDeviceNotification(); break; case MobileDeviceType.Android: deviceNotifiaction = new AndroidDeviceNotification(); break; default: break; } } catch (Exception ex) { ex.ExceptionValueTracker(deviceType); } return(deviceNotifiaction); }
private bool ShouldSend(bool isSilent, MobileDeviceType deviceType) { if (!isSilent) { return(true); } switch (deviceType) { case MobileDeviceType.Android: return(sendSilentAndroid); case MobileDeviceType.iOS: return(sendSilentIOS); default: return(false); } }
/// <summary> /// Gets the device notification. /// </summary> /// <param name="announcement">The announcement.</param> /// <param name="deviceType">Type of the device.</param> /// <returns></returns> public static IDeviceNotification GetDeviceNotification(MobileDeviceType deviceType) { IDeviceNotification deviceNotifiaction = null; try { switch (deviceType) { case MobileDeviceType.Apple: deviceNotifiaction = new AppleDeviceNotification(); break; case MobileDeviceType.Android: deviceNotifiaction = new AndroidDeviceNotification(); break; default: break; } } catch (Exception ex) { ex.ExceptionValueTracker(deviceType); } return deviceNotifiaction; }
/// <summary> /// Initializes a new instance of the <see cref="MobileDeviceInfo" /> class. /// </summary> /// <param name="assetId">The unique identifier for the device.</param> /// <param name="attributes">The <see cref="AssetAttributes" /> for the device.</param> /// <param name="assetType">The device type.</param> /// <param name="mobileEquipmentId">The mobile equipment identifier.</param> /// <param name="mobileDeviceType">The mobile device type.</param> /// <exception cref="ArgumentNullException"><paramref name="mobileEquipmentId" /> is null.</exception> public MobileDeviceInfo(string assetId, AssetAttributes attributes, string assetType, string mobileEquipmentId, MobileDeviceType mobileDeviceType) : base(assetId, attributes, assetType) { _mobileEquipmentId = mobileEquipmentId ?? throw new ArgumentNullException(nameof(mobileEquipmentId)); _mobileDeviceType = mobileDeviceType; }