开发者

Want to replace the old version with the new version in android

I have created the the android application and it was given to all my clients. Now I update my application and want that changes are done to all my clien开发者_高级运维ts. I don't want that client to uninstall the application and install the updated application again. I want that when the client opens the application shows a notification which asks the client to install the updated application and then log in.

I want to achieve this functionality does anyone have any idea how to do this? Please do reply me it's very important for my side.


How did you distribute the application? Through the android market? If so when you upload a new version their phone will periodically notify them that updates to some of the apps are available. If you did not implement this functionality in the version of your application that has already gone out then I am afraid you don't really have a way to make this happen.

Moving forward what you can do to implement something like this is have a webservice that returns the current version code for the application. In your apps onCreate() method call this webservice and compare the result with the version code of the app on the system. If the one from the webservice is greater then prompt the user to go download the new version.

Edit: If you didn't implement this in the version you've given out already then you have no choice but to just send out a new apk file to them. You can use some process similar to what i've stated above in the new version so from here on out you'll be able to set a value on the server that will lead to the users being prompted to download new version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜