有没有更新的应用程序明确共享preferences或删除的应用程序设置警报? [英] Does updating app clear sharedpreferences or remove alarms set by the app?

查看:137
本文介绍了有没有更新的应用程序明确共享preferences或删除的应用程序设置警报?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发表我的应用程序在谷歌商店,现在我想更新它。

I've published my app in google store and now I want to update it.

但我要放心,我不会失​​去我的应用程序共享preferences存储的数据。我还设置我的应用程序,某个报警它启动的通知,我不希望任何失去他们。

But I want to be assured that I don't lose stored data in my app shared preferences. I also set some alarm in my app which starts notification, and I don't want to lose them either.

我不知道如何更新应用程序的作品?它重写这些东西?反正是有,我可以测试它之前,我在全球发布了吗?

I'm not sure how updating app works? does it rewrite these things? Is there anyway that I can test it before I globally publish it?

我要指出,我在这个版本中所做的更改包括在清单中的一些变化:我改变了 targetSdkVersion 的minSdkVersion (它曾经有过 minSdk = 8 现在我已经改成了 4 并添加 targetsdk = 15 ),我给了一个进程的名字为我alarmservice(这是一个intentservice设置报警),但后来决定改变它,它不具有processname了。

I should mention that the changes I made in this version contain some changes in manifest: I changed targetSdkVersion and minSdkVersion (It used to have minSdk=8 now I've changed it to 4 and added targetsdk=15) and I gave a process name to my alarmservice (which is an intentservice to set the alarm) but then decided to change it and it doesn't have a processname now.

推荐答案

一般情况下,在共享preferences(以及其它用户数据)将在更新过程中被保留,但是有时,由于一些未知问题,数据可能丢失,我想这是在你的控制。所以,你可以简单地认为共享preferences将被保留。

Normally, the SharedPreferences(as well as other user data) will be kept during the update process, but sometimes, due to some "unknown" problem, the data may get lost, and I guess it is out of your control. So, you can simply believe that the SharedPreferences will be kept.

至于报警,你怎么设置这些报警?如果您在code设置这些参数,它应该是100%确定,只要你正确的code设置。

As for alarms, how did you set these alarms? If you set them in code, it should be 100% ok as long as you set them right in code.

,以测试最好的办法是你把它推向市场之前,你的设备上安装更新的应用程序。首先,你应该在手机上安装应用程序,你的市场的版本,然后用你的市场的密钥库导出您的应用程序在本地计算机上,终于,在手机上安装的导出版本(安装人员应告知你的更新)。你可以检查这些设置仍然存在。

Of course, the best way to test is install your updated app on your device before you push it up to the market. First, you should install your market version of app on your phone, then export your app with your market keystore on your local computer, finally, install the exported version on your phone(the installer should inform you about the update). And you can check if these settings are still there.

在导出时,最重要的是要确保为您的应用程序的市场版本中使用您使用的是相同的密钥库。

While exporting, the most important thing is to make sure you are using the same keystore as you use with the market version of app.

希望这会帮助你。

这篇关于有没有更新的应用程序明确共享preferences或删除的应用程序设置警报?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆