I have nearly completed my application and about to upload it into Android Appstore. I need to divide demo and paid versions - one is free with limited capabilities, another one - paid with full functionality. The question is: how to implement it - the only idea which I have in my mind is following:
Upload 2 independent applications placed on different packages. But in this case there's one obstacle: let say user installed demo application packaged as my.foo.demo then user decided to buy full version which will be installed in package my.foo.paid. In this case I need to provide user with ability to transfer user files/data/preferences from package my.foo.demo to my.foo.paid. Wow, but it's not very simple task (keeping in mind Android's security model)
Probably there's another approach? Any ideas?
The easiest way would be to upload two independent APKs. There is a way to have a user download a free version, and then download a "key" application that unlocks the paid functionality. That can lead to lots of user confusion since sometimes they will download the "key" application and not the base application. So if you can upload two different versions, that will eliminate that hassle (but means you have to maintain two versions).
So now to answer your question about sharing the data. The simplest way would be to have a content provider for your data and just export that to the paid version. Alternatively, you can look into the sharedUserId attribute in the application's manifest. This will allow you to run in the same process and access the same files.
Related
Some free applications can often be upgraded to paid premium versions. Is there a known packaging pattern so that the paid app replaces the free apps, and therefore gets all data the free may have stored ?
I understand that since app is identified by its unique fully qualified name this is impossible for an app to see data from another, but I kinda recall already seeing this. Or does it mean that I have to consider the two apps as completely distinct, and foresee an export/import feature mechanism ?
(this question is not related to the actual development of those two flavours, which can be achieved in many ways, but rather to the way app should be packaged)
Is there a known packaging pattern so that the paid app replaces the free apps, and therefore gets all data the free may have stored ?
No, the package names must be unique. Thus, one app does not "replace" another app and gets its data.
Or does it mean that I have to consider the two apps as completely distinct, and foresee an export/import feature mechanism ?
Yes, two apps are distinct. However, they can still exchange data.
These are common methods:
Publish one (free) app which contains all functionality but only has the free functionality enabled by default. Publish an additional (paid) app which serves as an unlocker. Your free app can check if the unlocker is installed and enabled the paid functionality accordingly. It is recommended to check the package signature of the unlocker app, e.g., as described in the answers here.
Similar to above but use in-app purchases in the free app instead of an additional unlocker app.
Publish both a free and paid app as self-contained apps. You can implement a ContentProvider to transfer data from the free to the paid app. Of course you can implement other export/import methods as well. However, using a ContentProvider with permissions makes it easy to automatically and securely copy the data, e.g., when the paid app is started for the first time.
I decided to build a paid version of my free Android application.
The paid version has some extra features. How do I manage both versions?
Is it possible to keep them based on the same source code?
If an application requires unique package name, how do I force paid application to replace free version?
What about db, preferences and other privately stored stuff, how to share them without exposing all data to the rest of the world?
Any advice that will help to manage both projects,
but not answers the above questions directly, is appreciated as well.
There are several approaches:
Put the core of your app in a library project, and create two other projects one for the paid, and one for the free version of the app. An upgrade to the paid version means the user has to uninstall the free version, and looses all the data.
This is the "classical" approach.
Let the user make an in-app payment. The user keeps all database and settings, and you have to maintain only one app.
This option requires extra modules to be included in your app, and extra logic.
Make another dummy/empty app, this is a paid app. The existance of this app means the user has a paid version. The user keeps on using the orginal/free app.
You can simply check by using the PackageManager to see if the paid app is downloaded.
The user keeps all database and settings, and you have to maintain only one app. Ok, there are two apps, but the second can be really small and simple.
You don't have to include additional libraries/code to make an in-app payment. You can also have all your apps upgraded to the 'pro' version with one purchase.
I don't know if all users understand this pattern. For the developper, this can be achieved with minimal work, and the users keep all their settings while upgrading.
I think it's possible and recommended to keep them in same source
code. Otherwise you have to support two versions of app instead of
only one.
If you have only one app therefore you have only one package name.
Create a class responsible for app features availability in current license state (free or paid). This class should store information about license state (free, paid, maybe you will deside to add subscription mode in future in which paid version can expire after some period). Features of your app available only in paid verion shoud check current license state. You can also change app GUI depending of license state. For example hide GUI of paid features, show "Buy" button or ads, etc.
And also if you have only one app that can be free or paid you don't have to share any internal app data between paid and free versions.
I know it is technically possible to put the same application into the app store with 2 almost identical APKs (different package names and titles), although probably a bit dodgy - I imagine this would not be allowed by Google, but I don't see anything in their Ts & Cs that prohibit this
https://play.google.com/about/developer-distribution-agreement.html
E.g. "My cool app free" And "The awesomest app trial"
Question: Is this allowed?
Reason: A colleague and I were debating the effect of titles and descriptions of downloads (based on different indexes/user searches) and wondering if people ever post a game/app with 2 different ones to see which is more successful
You can if the package name of the app is different, as you said. This is done quite often for apps with trial and paid version. Regarding your question, we have right now around 6 apps in Google Play which are different branded versions of the same app. This means, they have their own package name, splash screen, and some database data, but the app is really the same. So far we didn't get any trouble with Google, so I would say it's possible.
Just for reference, in case you are interested in doing something similar, the best option in terms of maintainability of your app, consists in using an Android library project.
Basically you have one main big project with the "Android Library" option checked in Eclipse. You have all the main code there.
On the other hand, you create two additional projects linked to your library. They will just need their manifest.xml and some activity to call the main activity of the library. Their package names must be different if you want to publish both apps in Google Play.
Additionally, you can override some resources for every project. For instance, you could have a boolean in /res/values indicating whether the project is a trial or paid version, with different values for them. Then, in the library you could check this boolean to show advertisements if it's a trial version.
Another useful thing you can do is using a custom splash screen for every app, by having different image resources in every project with the same name.
As far as I know, it is allowed and certainly has been done in the past (malware masquerading as popular games). Provided the app you're publishing is your own work (and really only the name is different), then I can't see anyone reporting it either.
It is prohibited according to Play Console Developer Program Policy (effective October 21, 2020).
We don't allow apps that merely provide the same experience as other apps already on Google Play. Apps should provide value to users through the creation of unique content or services.
Here are some examples of common violations:
Copying content from other apps without adding any original content or value.
Creating multiple apps with highly similar functionality, content, and user experience. If these apps are each small in content volume, developers should consider creating a single app that aggregates all the content.
If I want to deploy to the Android Market it looks like I have two options:
Create my own keystore and upload. When I update my app use that keystore on my APK to ensure that users are given the option to update.
Do step 1, but also implement Application Licensing which will put controls on how the app is used.
Am I correct to assume that step 1 means that anyone could copy my APK once it is purchased from the Android Market and install it anywhere they wish?
How common is it for people to use Application Licensing and is it the defacto approach?
My app will be paid and I want to ensure I am taking the best approach.
Am I correct to assume that step 1 means that anyone could copy my APK once it is purchased from the Android Market and install it anywhere they wish?
Yes you are correct, it would be extremely easy to copy your application.
How common is it for people to use Application Licensing and is it the defacto approach?
I would say it's very common since it's the only way to verify the licence against the Android Market, though I don't have any stats on this. Otherwise you would need to implement your own "Market" and verify purchases in your own.
My app will be paid and I want to ensure I am taking the best approach.
Use LVL, DO NOT use the default implementation. Watch the LVL session from the 2011 IO for a how to.
Often times, people will not simply download an app and copy it anywhere they would like. However, it is possible through some apps and other software for users to copy off APKs from their phones (even though they aren't suppose to). In my opinion, if you app is paid, you should implement Applicant Licensing. It is a very useful tool to help in preventing people from stealing your APKs (in other words, downloading it and then trying to install it some where else) as it checks on start up to ensure that the app is on the phone that purchased it. Otherwise, for free apps, I don't really see the neccessity because it's free and anyone could have downloaded it.
I want to upload the same application twice to the Android Market. One version will have AdMob messages and the other version of the same app will cost a pair of bucks.
Should I make two applications with differents packages names in order to upload them or is there any trick to do it with the same project.
Thanks in advance.
Every application at Android Market must have unique package name, so you have to place your apps into different packages (one be a subpackage of another though, i.e. com.app and com.app.ads). You can share common code in a library project.
You will need two different package names. You might also consider to exclude certain parts of your code in your free version, because Android Market is known for not being the most secure distribution channel. But if the only difference is the additional ads in your free version, it is not worth the effort.
There is another possibility, which unfortunately, I don't know how to do, but I'd like to find out. You can put all the functionality into one app and then create a second app which acts as a "key". Users download your first app for free, but it has limited functionality unless the "key" app is also present. You would charge users to download the "key" app.
This solution has the advantage of not having to maintain two code bases for every app, which is what I do and it drives me nuts.