1

I have got a suggestion to restrict an Android application to be installed a limited number of times, let's suppose three times for a given user account. I have already inserted a form at the start of the application which checks for username and password from our database, and returns whether its valid or not.

Next I have to apply a trick to prevent this application from being installed more than three times by each user. I hope it clears what I am trying to do. Any ideas what to do and how to proceed?

1

3 Answers 3

5

By no means you can restrict user to not to install your application from google play.

Sign up to request clarification or add additional context in comments.

2 Comments

what if if i create a form in application whcih requires user id pass to proceed
That's all logically you can do, you can restrict user to not to execute application further, but am afraid you can't restrict user for installing.
3

Have a install_count column in the user table in your database. Each time the user fills out form, check for the install_count value, if it is equal to 3, then don't allow the application to continue, you can show a message like "max installs exceeded" and exit the app. Otherwise, increment the install_count value in the db for that user.

PS: As Zoombie said, you can't stop the user from installing the app, but you can restrict the user from running the application if installation limit exceeds.

Also you need to be aware, there are many apps which take a back up of the installed app and data that can be restored back anytime. More over, if the user changes his device more than thrice, he won't be able to run your application. So consider the drawbacks of this limitation.

3 Comments

if u store in the database when uninstalled all the data base values are cleared. u can try with shared preferences and also i think Zoombie words are correct.
When you uninstall you application, everything associated with it will be cleared. At first app install u will get install_count = 1 and uninstall db gets cleared, again install u will get install_count = 1 only. Same for SharedPreference too.
If the db is maintained on a remote server, then you can always chose to persist the user data [filled by user in the app startup form]
2

Technically this isn't a very difficult problem but the issue of user relations will be difficult to manage. You should provide a simple and easy mechanism for your users to "reset" their install count. Additionally you need to inform your users of this restriction BEFORE they pay for your app.

Restrictions like this will result in problems in a few cases I can think of:

  1. What happens if a user factory resets their phone and then re-installs the app?
  2. What if the user installs a custom ROM or gets a new phone?

Are you going to deny a paying customer the ability to install an application that they paid for? Poorly enforcing a policy like this will only hurt you in the long run as it will result in

  1. very bad reviews of your app
  2. piracy of your app with the checks removed

Remember people are downloading/buying your app because it provides something to them and with that they assume that they'll always have access to your app. As soon as you start denying functionality or violating their assumptions you're going to start alienating your customers.

2 Comments

factory setting wounnt effect coz im thinking to save mac addresses which never change . installation count would only increase on a new decvice thanks for gr8 sujession . i ll have to think of these
@ShoaibAhmedKhan Be sure to inform the customers about ALL information you are collecting about them

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.