创建可更新的 Android 应用程序
我创建了一个 Android 应用程序,其中包含一些内置的单位转换工具。我正在尝试实现某种机制来更新应用程序,以便它将来可以包含更多单位转换。这意味着每次更新都会在已安装的应用程序的代码中添加一些新的按钮、文本和转换因子。更新文件将通过网站下载,并将新代码添加到应用程序中。这意味着用户不必通过 Android 市场更新整个应用程序。
谁能指导我实施这个。我正在考虑使用 xml 文件来实现此目的,但我不知道它们是否有效。
I have created an Android application that includes some unit conversion tools built into it. I am trying to implement some kind of mechanism to update the application so that it can incorporate more unit conversions in the future. This means that each update will be adding some new buttons, text and conversion factors into the code of the already installed application. The update files will be downloaded via a website and the new code added to the app. This means that the user won't have to update whole of the app via the android market.
Can anyone guide me in implementing this. I was thinking of using xml files for this purpose but I don't know whether they will work or not.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Android Market 更新机制的存在是有原因的。您应该只考虑在非常有限的情况下进行您所要求的动态更新。下载转换系数和描述性文本的列表就可以了,Web 服务器上的 XML 文件就可以实现这一点,但如果您考虑下载整个布局,那么我会使用 Android Market 来分发而是更新的应用程序。
The Android Market update mechanism is there for a reason. You should only consider doing the sort of dynamic updating you are asking about in very limited circumstances. Downloading a list of conversion factors and descriptive text would be fine, and an XML file on a web server would work for that, but if you get to the point where you are thinking about downloading whole layouts then I would use the Android Market to distribute an updated app instead.