- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
一如既往:我很菜鸟,正如你从问题中可能看到的那样。
我正在 Xamarin.Android 中使用 Azure Wams,它似乎是一个很棒的工具。它大大登录Xamarin.Android中的用户。当我希望用户能够注销然后使用另一个帐户登录(我使用 Google 进行身份验证)时,我的问题就出现了。我曾经可以通过注销按钮使用它,如下所示:
登录时,AuthenticationToken 会保存在字符串中以供以后使用。因此,当用户确认他想要注销时,我只需 UserAuth = String.Empty,然后再次调用 ConnectToMobileService():
public async Task ConnectToMobileService ()
{
try
{
CurrentPlatform.Init ();
client = new MobileServiceClient(
Constants.ApplicationURL,
Constants.ApplicationKey, progressHandler);
if (string.IsNullOrEmpty(UserAuth)) {
await Authenticate();
UserId = user.UserId;
await CreateTables();
await CheckUserId ();
}
else if (!string.IsNullOrEmpty(UserAuth)) {
client.CurrentUser = new MobileServiceUser(UserId);
client.CurrentUser.MobileServiceAuthenticationToken = (UserAuth);
await CreateTables();
}
}
catch (Exception e)
{
CreateAndShowDialog(e, "Error");
}
}
这用于为我重新启动身份验证窗口,并且用户使用他的新帐户登录 - 同时信息保存在首选项中以用于其他事件等。嗯,更新 Xamarin 并将我的许可证升级到 Indie 后,情况不再如此。现在,它会启动短暂的“身份验证”,然后直接返回,就像用户按照之前的方式登录一样。
我意识到这可能是因为在某个地方为 Wams 保存了一些共享首选项。我研究了清除这些 Java 的方法,但我无法在 C# 中重新创建它们。
client.Logout()似乎并不能单独清除它们。这就是我尝试重新创建其余部分的方法:
private void ClearPreferences(){
var prefs = this.GetSharedPreferences("UserDate", 0);
var editor = prefs.Edit ();
editor.Clear ();
editor.Commit ();
}
这没有任何作用。那么,有人可以帮助我吗?我如何重置它,以便用户能够使用另一个帐户登录 - 或者例如让 friend 在他们的手机上登录?提前致谢!
最佳答案
好的,事实证明该信息由身份验证提供商存储为 cookie。您必须注销并清除 cookie。然后它就像一个魅力一样发挥作用。清除 cookie 的方法如下:
client.Logout ();
ClearCookies ();
await ConnectToMobileService ();
}
public static void ClearCookies () {
Android.Webkit.CookieSyncManager.CreateInstance (Android.App.Application.Context);
Android.Webkit.CookieManager.Instance.RemoveAllCookie ();
}
关于c# - 无法注销 Azure Rms 移动服务用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24083715/
我正在编写一个 python 函数来返回 .wav 文件的响度。 RMS 似乎是最好的指标, Detect and record a sound with python 。audioop.rms()
J2ME中的记录管理系统是临时存储系统吗?应用程序关闭后它会消失吗? 最佳答案 RMS只是在 j2me 中使用的存储概念。它不是临时存储。当您删除应用程序或 RMS 时,它会永久存储。 一些 3rd
1.模拟器问题: 我第一次启动我的 midlet 应用程序是为了存储一些数据,然后我第二次重新启动它是为了读取存储的数据。它在前两种情况下运行良好,无一异常(exception)。 但是我第二次以相同
我正在尝试计算波形的 RMS 值,但遇到了一些问题。 我每 x 微秒采样一次,这是由中断触发的。样本存储在一个数组中,每次采集样本时,它会将最后一个值推送到数组中的下一个点并输入一个新值。当我采集样本
我有一个一维 float 组 root mean square值,每个值都使用相同的窗口长度计算。假设 RMS = {0, 0.01, 0.4, ... } 现在,可以表示为原始窗口范围的较大窗口的
我有一些音频数据(浮点数数组),我用它来绘制一个简单的 波形。 绘制时,波形不会在边缘达到最大值。 没问题 - 数据只需要标准化。我迭代一次以找到最大值,然后再次迭代将每个除以最大值。再次绘制,一切看
我正在使用 ffmpeg 将立体声音频文件转换为单声道。 ffmpeg -i $1 -ac 1 -ab 192k mono_$1 但是,转换后的 RMS 和峰值响度级别是不一样的。 Tests-iMa
我正在创建一个读/写 RMS 记录的 J2ME 应用程序。我能读能写 记录在 RMS 但现在的问题是我想通过接受一些值来删除记录 喜欢 accountNumber . RMS 记录的格式。 101,A
所以我在我的工作表中计算基本统计数据,它包括以下代码: xxx = Application.worksheetfunction。 平均 (等等等等等等 yyy = Application.worksh
有没有一种简单的直接方法来计算谷歌表格中的均方根/二次均值?我宁愿不必创建另一个包含第一个平方的数组来对平方求和。 最佳答案 无需您提供有关数据外观的任何进一步信息,您可以执行以下操作 假设你有这样的
rms 包中包含大量有用的统计函数。但是,我找不到从拟合对象中提取某些拟合统计数据的正确方法。考虑一个例子: library(pacman) p_load(rms, stringr, readr) #
我有一个代表图像的二维数组。我必须向图像添加 RMS 2 单位的背景高斯噪声。我不熟悉噪声的 RMS 测量以及如何添加它。您能否告诉我如何执行此操作? 最佳答案 按照我的理解,您想要在每个像素处添加遵
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 7 年前。 Improve this ques
我正在测量交流电压并计算 ADC 的均方根值。 我有一个包含 128 个信号样本的数组。在计算平方数时出现错误。 unsigned long int calval=0; unsigned int lo
我无法从 rms 包中获得逻辑回归以使用 confint(),这是一个示例: library(rms) data(mtcars) dd <- datadist(mtcars) options(data
我有在 J2ME 中使用 RMS 存储值的代码。在模拟器上运行良好。所以,我的第一个问题是 当我重新启动模拟器时,所有存储的值都被删除。 存储的值显示在模拟器中,但没有显示在我正在测试我的应用程序的移
我正在尝试加载rms库,但我不断收到此错误消息: object 'plotp' not found whilst loading namespace 'rms' 我安装了具有依赖性的rms。感谢您的帮
一如既往:我很菜鸟,正如你从问题中可能看到的那样。 我正在 Xamarin.Android 中使用 Azure Wams,它似乎是一个很棒的工具。它大大登录Xamarin.Android中的用户。当我
我不确定我是否完全理解使用 Azure 保护策略和 Azure RMS 提供的工具可以保护哪些类型的数据。 特别是,我无法理解“非 native ”数据格式在多大程度上可以从通用保护中受益。 这真的适
所以我正在尝试测试一些分析某些 PCM 数据量的代码。我得到了一些奇怪的体积测量值,这些测量值与我从 audacity 获得的数据没有任何意义。看来我的测量结果到处都是。 我不确定我的错误是否在于我读
我是一名优秀的程序员,十分优秀!