3

I don't know is it possible or not. I want to know how it is possible that user can install my app (android , iPhone, phonegap based) for a fixed time , may be 1 month. After 1 month, user will be unable to run the app. Then if he uninstall and try to install again for next 1 month, it would prevent him to install.

Is it possible or not? if possible how?

-Arefin

2 Answers2

3

There's no 100% secure way to do what you want, but you could do something like this:

  • Get a unique identifier for device where app is installed. There's NOT perfect way to get this identifier, but here are some options: Is there a unique Android device ID?

  • Make your app connect to your server and register that identifier

  • Your server can return whether or not your app was already installed there, so app can act accordingly.

A side effect would be that your app could not run without Internet connection, to prevent users from disconnecting from Internet to avoid this control.

Community
  • 1
  • 1
Jorge Cevallos
  • 3,667
  • 3
  • 25
  • 37
0

You can also specify the validity option in when you're creating the keytool. The keytool is used when exporting the .apk file of an application.

Or

You could save the install date of application in Shared Preferences- that's when the app is being installed for the first time. Then check the number of days from current date and saved date, every time the app is started and allow access only if its within limits.

Removes the problem of Internet access.

Shivam Verma
  • 7,973
  • 3
  • 26
  • 34
  • First option would prevent all users from using the app after certificate expired, even users who purchased the app. Second option would not work if user deletes app data or if he uninstalls/reinstalls the app. – Jorge Cevallos Sep 11 '12 at 20:19