Demo app limited to trial period

William Hunter

Active Member
Licensed User
Longtime User
Is there a way to create a demo app that could be limited to a specific number of days, at which time the app would be exited with an end of trial message? Some record would have to be left on the device after uninstall, so that any reinstall would not run, giving the same end of trial message.

This can be done in Windows using a registry key named in such a fashion that it appears to be associated with Windows, rather than the demo app. This makes it virtually impossible to find, unless you know what to look for.

I haven’t been able to think of a way to accomplish this with Android. Has anyone else found a way of doing this? Any help would be greatly appreciated. :sign0163:
 

JonPM

Well-Known Member
Licensed User
Longtime User
I do this using php and a server. You don't really want to store a file locally because it is very easy for the user to delete.
 
Upvote 0

wheretheidivides

Active Member
Licensed User
Longtime User
it'd be a lot easier if google would have that option when you upload the app. Say, use for so many days. Then the android app would not work. or at the very least, the next time run it would connect to google and check.
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
I would limit the functionality of my app and the user can re-install it forever.
It should be complete though, but in database, for example limit the number of records to 20... or you can add watermark on the screen... annoying beep every
few minutes, and so on... you may also make the demo app run a little slower
but must warn the user about this and tell them it is running slow on purpose
because it is demo.
many ways like this.
 
Upvote 0

wheretheidivides

Active Member
Licensed User
Longtime User
I would limit the functionality of my app and the user can re-install it forever.
It should be complete though, but in database, for example limit the number of records to 20... or you can add watermark on the screen... annoying beep every
few minutes, and so on... you may also make the demo app run a little slower
but must warn the user about this and tell them it is running slow on purpose
because it is demo.
many ways like this.

I like the limit the database to 20 records thing. So how would you get in app billing to be able to detect a sale and take that limitation away? I know you could have 2 app (a demo and a pro) as well.
 
Upvote 0

William Hunter

Active Member
Licensed User
Longtime User
Thank you all for your input. JonPM’s suggestion is certainly one way, although I was hoping for a much simpler solution. The demo app limited in function would also be an option. I would much rather have a full functioning demo, but limited to a trial period. Maybe there just isn’t a way.
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
So how would you get in app billing to be able to detect a sale and take that limitation away?

you may use a persistent object to save the limitation, then send a key to your user... but the best bet is to maintain
two version of your app as you mentioned. This is how Erel is doing it.
 
Last edited:
Upvote 0

William Hunter

Active Member
Licensed User
Longtime User
If it were possible to create an invisible file on first run writing it to File.DirRootExternal, and then write/read data to/from it at some other point in the code, something could be built around this to perform a usage check. I’ve looked and don’t see a way to make a file invisible. Does anyone know if this can be done?
 
Upvote 0

MLDev

Active Member
Licensed User
Longtime User
You can put a dot "." before the file name to mark it as hidden in Android. This just prevents the file from being listed in certain conditions. It's still easy to find. You can try this to make the file a little harder to find. This will somewhat encrypt the device's android_id with an integer password to make a file name that's different on each device. Well different on almost all devices. :D

B4X:
Dim ph As Phone
Dim PWord As Int = 1234567890
File.WriteString(File.DirRootExternal, "." & Bit.ToHexString(Bit.Xor(Bit.ParseInt(ph.GetSettings("android_id").SubString(8), 16), PWord)), "Now " & DateTime.Now)
Log(File.ReadString(File.DirRootExternal, "." & Bit.ToHexString(Bit.Xor(Bit.ParseInt(ph.GetSettings("android_id").SubString(8), 16), PWord))))
 
Last edited:
Upvote 0

Vader

Well-Known Member
Licensed User
Longtime User
Because of the fact you can't change the price of an App from free to an actual dollar value, my plan was to create two versions.
Version 1 is named AppName (trial)
Version 2 is named AppName

Version 1 is free
version 2 is paid for

Not really the answer you want, but it may give you an approach.

Dave
 
Upvote 0

William Hunter

Active Member
Licensed User
Longtime User
@MLDev – You’ve passed along some new tricks for me to ponder. Using the phone ID to generate a phone specific name for the data file is certainly innovative. Unfortunately, it would not work on non-cellular devices. Have you been using this form of trial period limitation with success yourself?

@Vader – I agree that two apps would be the best approach. My thought is that I would like to have the demo app full functioning, but limited to a trial period. There would be the two versions, AppName and AppNameDemo.

Thank you both for your input.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
There is also the "unlocker" approach used by some apps. You publish your app with features disabled and/or with a time limit. When user buys and install the unlocker-app from GooglePlay, your app will somehow recognize that the unlocker-app has been installed/purchased on the device and your app will unlock the features and/or delete the time limit.

I have seen a few apps doing it this way.
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
It's getting more interesting challenge than just search for a solution!

How about checking a label's BackColor property?
The domo label's BackColor will be red. Then when your user receives the (key) she
will pass it to a separate app that will in turn open the demo (in binary debug mode) and change the BackColor to Green!
A little difficult may be, because you need to know the start address of the property value in memory and how many bytes it's length is!!! (beside other things).
cheers!
 
Last edited:
Upvote 0

MLDev

Active Member
Licensed User
Longtime User
@MLDev – You’ve passed along some new tricks for me to ponder. Using the phone ID to generate a phone specific name for the data file is certainly innovative. Unfortunately, it would not work on non-cellular devices. Have you been using this form of trial period limitation with success yourself?

I think android_id is available on almost all Android devices. That code works on my Nexus 7 and Acer tablets. This is just a hobby for me. All of my apps are free right now. I haven't done anything with a limited trial period.
 
Last edited:
Upvote 0

wheretheidivides

Active Member
Licensed User
Longtime User
There is also the "unlocker" approach used by some apps. You publish your app with features disabled and/or with a time limit. When user buys and install the unlocker-app from GooglePlay, your app will somehow recognize that the unlocker-app has been installed/purchased on the device and your app will unlock the features and/or delete the time limit.

I have seen a few apps doing it this way.

and how is this programmed? I know it must use inapp billing somehow.
 
Upvote 0

William Hunter

Active Member
Licensed User
Longtime User
I think android_id is available on almost all Android devices. That code works on my Nexus 7 and Acer tablets. This is just a hobby for me. All of my apps are free right now. I haven't done anything with a limited trial period.
Thanks MLDev – I’m going to work on something using your suggestion, and see what I come up with. I’ll probably just get something working for me, when Erel will come out with B4A version 2.60. This new version will have three new menu items:

1. Check to create as trial version

1. Enter number of days for trial

2. Check to create trial unlock key

Then none of us would have to ponder these things. I enjoy working with B4A, but still have a lot to learn. Thanks to all who have responded. I’m going to keep monitoring this thread. I think there may be more forthcoming from those with experience in trial limiting methods.
 
Upvote 0

TomA

Active Member
Licensed User
Longtime User
Limiting demo versions

Think hard before releasing a demo version of an app with built in limits (like 20 records in a database). There is always the chance that the very thing you place the limit on is the thing a potential customer may most want to check out (like wanting to see how the database functions when it is loaded with 5000 records). Several years ago, I was looking for video editing software that would let me process large video files (longer than an hour in length) in a reasonable time. Many of the programs I tested placed a limit on the video length in the trial version - i.e. they were limiting the very thing I wanted to check since the speed of processing a large file was of primary importance to me. I have since run into that type of problems with other trialware - a limit on the one key feature that is the important thing that I wanted to test. A time limited trial period is better.
For time limited trials, give careful consideration to any time limits. I have sold shareware for many years (over 15) and have found that a trial period of 45 days seems best - a shorter period is not long enough for a user to become dependent on the program so they may not buy, a longer period does not seem to increase sales.
 
Upvote 0

JonPM

Well-Known Member
Licensed User
Longtime User
I still say the best way is to do a server-side check. This gives you everything you want. Full limitless trial while being difficult to crack.
 
Upvote 0

NFOBoy

Active Member
Licensed User
Longtime User
One Possibility

I have some demo code that updates SystemsSettings, and is Not easy to find where it is modified (by the average user) posted here.
 
Upvote 0

wheretheidivides

Active Member
Licensed User
Longtime User
I still say the best way is to do a server-side check. This gives you everything you want. Full limitless trial while being difficult to crack.

Then the user must have internet access. A lot of places don't. I traveled from las vegas across the county to florida and let me tell you, 75% of the time no internet. Cell phone worked, but no internet or wifi. I'd have to stop at a krystals or somewhere and use their wifi just to goto weather.com.

Heck, only 1/2 of my house has wifi, so using the android tablet on the other side of the house doesn't work (unless I turn on laptop and run connectiy).
 
Upvote 0
Top