1

I've searched for trial application expiry methods and I've found good answers regarding Trial periods for apps but they're time-based.

How can I create a Trial app version that expires after clicking a button 3 times?

based on this link Creating an Android trial application that expires after a fixed time period (option 2 on the accepted answer) I would like to hard code the number of times they have used it, so even an uninstall/intall would have no effect, is this possible?

Community
  • 1
  • 1
zuspence
  • 78
  • 5

2 Answers2

0

Since you don't want to allow the user to get the trial again if he reinstalls the app you will have to use the third technique where you send the data to the server because that is the only way to persist the count of button clicks and tie it to the device across app installs. So instead of using the time u can keep a count of the number of times the button have been clicked on the server. Also u can configure the number of button clicks you want to allow before the app expires instead of hardcoding in the app.

If you don't want to run your own server then you use Parse to store the number of clicks of the button and the user id. It is very easy to integrate. https://parse.com/docs/android/guide#getting-started

pgiitu
  • 1,671
  • 1
  • 15
  • 23
0

On top of pgitu's answer, I also suggest using Parse Anonymous user in which the anonymous user has a field for device ID (the unique identifer for their phone).

Every time the user starts the app, check if a ParseUser is logged in (the anonymous user) if not first check if a user exists with the current device ID for your app and log them in automatically if so. If not, create a new anonymous user and associate the current device id to that new user.

Now, you won't need to force a user signup / login mechanism and you can store information like clicks and such as pgitu suggests. All the remembering of information is done using Parse Anonymous Users and is fairly easy to setup and do.

The catch would be if the user has multiple devices. In this case, you cannot do much with what I'm suggesting but that is just a caveat of having a trial based application and relying on unique devices to mitigate user's and the system. It really shouldn't be an issue though considering you keep track of devices and their # of trials is limited by their # of unique devices.

Lucas Crawford
  • 3,078
  • 2
  • 14
  • 25
  • The Parse Anonymous user ID is device related right? So even if the same person is installing on 2 different devices it just means that those 2 devices will log on and have a trial "button clicking" experience? Like, if I set the trial limit to 3 clicks, he would have a total of 6 clicks divided in 2 devices? It's not that much of a hassle, I think, considering the app. Thanks! – zuspence Oct 05 '15 at 23:15
  • From a quick glance in the documentation, I didn't see if Parse automatically handles saving deviceId to the particular Anonymous user's created. What it does do is store the fact that the Anonymous User is logged in (in the cache of course, so a user can clear this). Since the user can clear cache is why i said associate the device id to the anonymous user so they cannot just clear cache and in effect having a new "trial". – Lucas Crawford Oct 05 '15 at 23:18