android how to implement licensing for 30 days using license dll? - android

i have created an application and would like to provide a 30 days trial period for the same using licensing dll provided by android (http://developer.android.com/guide/publishing/licensing.html#support),but i cannot find how to restrict this licensing to 30 days from date of installation.
Thanks in advance.

I haven't used the licensing library yet, but my understanding is this is one of the major gripes/flaws about the setup in general. Since only paid applications can use the service, you really can't implement a trial period for a paid app.
The licensing portion, does just that, licenses the application. If the application is able to obtain a license from the server, then it's free to run indefinetly...or until the application code is triggered to do the check again. There is no check at the server that has anything to do with timing. Since John Q app user paid for the app, he expects he will always be able to obtain a license.
You could build your own custom methods to do time checks via shared prefs using the install or first time the application was run, but all someone has to do is delete the app and re-install it.
Essentially, I believe this is a big portion of why there are so many sets of the same application in the market place. "Sets," referring to a lite/trial/full/beta/eval version of the same app.

Related

"Protect" app: Free to full version via InApp purchase? Market license verification? Or useless?

Now I've nearly finished my first app and I wanted to have two versions of it, one free (with ads and a little less functionality) and one full/paid version.
I know that you can not completely prevent apps from being cracked/distributed, but anyway, I'm currenlty having some thoughts about what the best method would be to release the app.
1) Both full and light versions in the store with no additional checks
2) Full version with Google Market license check integrated... Does this really bring any "security"? I've read that this protection has been cracked and therefore is pretty useless?
3) Have the light version and convert it via InApp purchase to the full version? Currently I have no idea on how to implement InApp billing and how to check whether a user paid inApp to release the full functionality and... of course there are also ways around that, right?
How would you do it?
Do you try to prevent your app from being illegally shared, or do you think it's not worth the effort, as any protection can be removed (and then it's shared anyway)?
Just gathering some thoughts :)
I have been through the same thought process and settled on option 3 for new apps.
My reasoning is as follows;
With option 1 you have two apps to maintain, users have to do a uninstall of your trial version and you have the problem of migrating data between the two versions.
Option 2 has all the problems of option 1 plus the headache of implementation.
Option 3 you have the benefit of only one codebase to maintain, users can quickly and easily upgrade with all their data intact and you have higher download stats/ratings for the one app rather than two.
Implementing it has got a lot easier with the version 3 of the billing library. I followed the sample from Google here and got a simple remove the ad's with IAB within a couple of hours.
I personally think that an In app purchase is the most secure way to stop people from getting free paid versions of your app, because when someone inevitably (if your app is popular) release an apk file of your app on the internet, it is just the free version.

Creating A time Bound Trial Version Of an Android App

I have seen so many threads on creating a time bound trial versions for an android apps but none of them seems to fulfill my purpose.
Few days back i Launched the paid version of my app and now I want to come up with trial version which i dont want to be crippled from any side. So i want to have a time bound limitation on the trial version. I have created a different Package name for the same. Earlier I was using LVL and now also I am using the same except that i created new license library and changed the
setValidityTimestamp(extras.get("VT"));
to
setValidityTimestamp(String.valueOf(System.currentTimeMillis() + (5* MILLIS_PER_MINUTE))); in ServerManagedPolicy.
so that i can test if trial version works for 5 mins and then give me the license error. I published it on the app store , downloaded it and then found that it was still working beyond 5 mins. Now i have unpublished it. Can someone help me in creating the better time bound application which a user can run for a week (say). Besides he should not be able to uninstall and re-install it and then again use it permanently. I know if i can write the info to some external file but again the file can be deleted from sd card and application can be made accesible to the user free for lifetime.
Regards
Pankaj
Within the current capabilities of LVL, and the degree of user control over your average handset, there is currently NO way to do this without a server-side component. Once your app is uninstalled all traces (except, as you pointed out, files you may write to the SD card, which are user-visible) are removed, so the only way to check for an uninstall/re-install is to generate a consistent, device-specific identifier and check with a server component that will either reject this as a re-install or accept it as a new time trial. Even this can possibly be spoofed by a dedicated customer (depending on the server-side component behavior), so you would need to engineer your software so that your server-side component is a necessary part of the process (i.e. it isn't just a license check, it is actually part of the application's functionality).
If you come up with something that works I'd love to hear about it, but I'd say you're out of luck.
#Femi is right, you need a server side component to make always work. What I tend to do is publish only a free version, and teh user buys the full version as in-app-purchase. The IAP server is your server side check if the use purchased the upgrade or not. You can store a pref on first use to know when the user started using the app. If users uninstall and install again your app, they get a new trail period, but this is annoying, and few will do it to save a few bucks. If you add a message in the app where you ask user nicely to upgrade, or have ads that are removed once you upgrade, it is a good enough solution.

Android get license for application after trial period

I need to implement Android application which will be expired after few days or number of uses.
The application will be on the google market.
I can implement the check using shared preferences.
But what should I do in the application if user decides to buy the license?
Is it possible for user to pay via the market?
You can have two different applications. One will be the full version and the other will be the licensed version. The first version will store the first date when the application is run as a SharedPreference. It could also be stored on a server somewhere else. It will then work for only so many days after that. The second version(licensed version) will not work until the user types in the correct product key. This could be validated over the internet.
I'm not sure why you would want to do this though. Most apps on the Android market will have a free version of their application with limited functionality. Then the full version of the application can be purchased separately. This model seems to work well for many applications.

Deploying to the Android Marketplace

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.

how can i use LVL for creating a time limited version (trial version) of an app

i want to create a trial version app, but i couldn't find how to limit the app usage for a fixed time (say 15 days).
Is it possible using android LVL?
I would suggest you read the second answer of this thread.
I don't think you can and should want to release a free version with the same package as a future paid version : you won't be able to do so.
But the right solution, to my mind, is a different package with an other kind of security check that prevents the app from working after some time.
You want people to download freely your app then you have no choice exept saying your app is free, for every one, but this could be for a limited trial period (i.e berfor june 15)
Otherwise, I don't see how you could do to let people download it for free AND pay for licence.
Remember that if you choose to make a free app :
this leads a server policy manager to send a huge number as validity time stamp for the licence checker.
thus, when your app will become paid then you will never be able to say if your first users of free version converted... LVL will let your free users run the free version.
I kind of think something should be feasible by re writing a server managed policy and changing the validity when receiving it from server, but it seems to me LVL has not been meant for that and it would be a pity to loose some revenues...
Here is the code for servermanager, you could attempt to override setValidityTimestamp and give it an upper limit if licence is given for free.
But, again, the right solution, to my mind is a different package with an other kind of security check that prevents the app from working after some time.
Steff

Categories

Resources