如何在设备或APK更新中自动更新APK

时间:2020-06-18 17:23:43

标签: flutter

我创建了一个应用程序,必须将其上载到Play商店,但是如果我在本地对该应用程序进行了一些更改并再次将其上载到Playstore,则他/她将打开Play商店并更新apk,我想在构建新版本的apk并将其再次上传到Playstore时这样做,然后如果用户打开apk,则弹出窗口将显示新版本的apk已发布,您必须更新应用程序,然后他将再次输入到应用程序中。

我正在尝试使用Upgrader,但没有在我的项目中应用

我必须创建一些应用程序广播,但我没有获得如何创建此网址'https://raw.githubusercontent.com/larryaasen/upgrader/master/test/testappcast.xml'

 final appcast = Appcast();
 final items = await appcast.parseAppcastItemsFromUri('https://raw.githubusercontent.com/larryaasen/upgrader/master/test/testappcast.xml');
 final bestItem = appcast.bestItem();

以及如何创建必须在其中编写示例代码的appcast文件

   <?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
<channel>
    <title>Debt Now App - Appcast</title>
    <item>
        <title>Version 1.15.0</title>
        <description>desc</description>
        <pubDate>Sun, 30 Dec 2018 12:00:00 +0000</pubDate>
        <enclosure url="https://play.google.com/store/apps/details?id=com.moonwink.treasury" sparkle:version="1.15.0" sparkle:os="android" />
    </item>
</channel>
</rss>

0 个答案:

没有答案