public object RegisterDevice(string token, DeviceType type)
        {
            UsageData.SetIsMobileAppUser(SecurityContext.CurrentAccount.ID, type);

            using (var pushClient = new PushServiceClient())
            {
                string regid = pushClient.RegisterDevice(
                    CoreContext.TenantManager.GetCurrentTenant().TenantId,
                    SecurityContext.CurrentAccount.ID.ToString(),
                    token,
                    type);

                return(new { regid });
            }
        }
 public bool IsMobileAppUser(DeviceType?type)
 {
     return(UsageData.GetIsMobileAppUser(SecurityContext.CurrentAccount.ID, type));
 }