Upgrading free to paid Android apps without leaving two icons
I have an Android app with free and paid versions, where the free version has a time limit, after which it redirects users to the Market to buy the paid version. The two versions have different package names and are submitted开发者_JS百科 to the Market as separate applications.
However, when users buy the paid version, this doesn't replace the free version - they're left with both versions installed at once. I'd like it to install over the free version. Ideally it would also replace any existing shortcuts on the home screen with shortcuts to the new version, but that's less important.
Is there an elegant way to handle this?
You can't have the free version automatically deleted when a user buys the paid one. Only the user of the device can uninstall applications from the phone, and he must do so manually.
If the two icons thing really bothers you, you could always switch to a free version model only, using in-app billing to unlock features or contents in your app.
A popular way to handle this situation is to only release one fully-functional package.
Put all of the functionality into the "free" version, and then release a "Pro Key" which is just an empty package. Then you can add a function to the free version which checks whether the Pro Key is installed. You can then use this function to selectively unlock certain features of the application.
See How can I use the paid version of my app as a "key" to the free version? and Detect if app was downloaded from Android Market for more info about this process.
精彩评论