/// <summary> /// 设置alias /// </summary> /// <param name="alias">Alias.</param> public void SetAlias(string alias) { if (string.IsNullOrEmpty(alias)) { return; } if (!EldYoungUtil.IsValidTagAndAlias(alias)) { return; } //判断是否已经设置过别名,若设置过,将不在设置 var jpush_alias = sp_jpushInfo.GetString(Global.Jpush_Alias, string.Empty); if (alias == jpush_alias) { return; } //使用hanlder异步设置alias handler.SendMessage(handler.ObtainMessage(MSG_SET_ALIAS, alias)); }