如何使用Xamarin表单从Play Store获取版本的应用程序数量
我需要检查已安装的应用程序和Playstore应用程序版本的当前版本。如果不是同一应用,则应导航到PlayStore。 我使用xam.plugin.latestversion(2.1.0)从Play Console获取最新的应用程序数量。不幸的是,没有从Play Store获得最新版本的应用程序。以下代码IM使用。
private async void ChekAppVersion()
{
try
{
latestVersionNumber = await CrossLatestVersion.Current.GetLatestVersionNumber();
installedVersionNumber = CrossLatestVersion.Current.InstalledVersionNumber;
if (installedVersionNumber != latestVersionNumber)
{
await DisplayAlert("New Version", "There is a new version of this app available. Please update now?", "Ok");
await CrossLatestVersion.Current.OpenAppInStore();
ChekAppVersion();
}
else
{
}
}
catch (Exception ex)
{
}
}
即时通讯,我获得了installedversionnumber,但我无法获得最新的verseversionnumber(PlayStore)。 请为此提供帮助。
I need to check current version of Installed Application and Playstore application version. If it is not same app should navigate to Playstore .
im using xam.Plugin.LatestVersion(2.1.0) To get the latestversion number of application from play console. unfortunately not getting latest version number of application from play store. The below code im using.
private async void ChekAppVersion()
{
try
{
latestVersionNumber = await CrossLatestVersion.Current.GetLatestVersionNumber();
installedVersionNumber = CrossLatestVersion.Current.InstalledVersionNumber;
if (installedVersionNumber != latestVersionNumber)
{
await DisplayAlert("New Version", "There is a new version of this app available. Please update now?", "Ok");
await CrossLatestVersion.Current.OpenAppInStore();
ChekAppVersion();
}
else
{
}
}
catch (Exception ex)
{
}
}
Im getting the installedVersionNumber, but im unable to get the latestVersionNumber(Playstore).
Please help on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
他们已从
div
中删除了该版本,现在已使用JS显示,但是数据仍在< script>
标签中。我当前的固定代码是:使用nugets
侏罗纪
评估页面上的脚本,htmlagilitypack
解析html,Xamarin.sentials
检查我们是否在线,和
appomobi.specials
for.todouble()
等,我希望这对修复
They have removed the version from
div
, now it's displayed with js, but data is still there inside a<script>
tag. My current fixed code is:Using nugets
Jurassic
to evaluate the script on page,HtmlAgilityPack
to parse html,Xamarin.Essentials
to check if we are online,and
AppoMobi.Specials
for.ToDouble()
etcI hope this could also be useful to fix https://github.com/edsnider/latestversionplugin/issues/43 :)
您使用的插件不再适用于Android https://githbithub.com/github.com/github.com/edsnider/latestversionplugin/问题/43
您需要找到一种获取所需信息的新方法。
The plugin you are using no longer works for Android https://github.com/edsnider/latestversionplugin/issues/43
You will need to find a new way to get the desired information.
PR已在此插件上进行...它再次工作;-)
PR has been made on this plugin... it works again ;-)