Validity

harry5568

Member
Hi...Can anybody tell me how to make an Application valid,say for 30 days,after which you need to purchase it , or input a unique key,different for all Applications distributed.
Thx..Harry
 

ceaser

Active Member
Licensed User
Hi Harry

What I do is to use the "Hardware.dll" and read the device ID.

i.e. Label14.Text=SubString(Hardware1.GetDeviceID,0,28)

This number is different for every PDA. The program displays this number, after which the user phones\emails me with that number. I then enter that number in a formulae and get another number. This number the user then enters in the program, which enables the program.

The program will only work if the correct number is entered.

I hope this helps.

Regards
Michael
 

konisek

Member
Licensed User
Longtime User
I use simillar way with a IMEI. I combine several figures of the IMEI number and the result is shown to the user in "about" screen. Instead, the user sends this result to a server via a "charged" sms and the server's script generates an uniq code that matches only to users IMEI result and sends it back to the user by sms. The user enters the code from the received sms and registers it (the application writes it to the registry). The next time application starts, it first reads the registry and compares.
The thing with the server and script is a service of another company that takes certain part of the "charged" sms and the rest is mine.
Or you can set up certain date value and compare it with actual date value, i.e.
(certain date value + 30) > actual date value then ...application works
 

harry5568

Member
Hi Harry

This number the user then enters in the program, which enables the program.

hi ceaser,
can u elaborate this second phase by means of an example please.
How will the application on his device recognize this as the correct match?? Thanx..Harry
 

harry5568

Member
This number the user then enters in the program, which enables the program.

hi ceaser,
can u elaborate this second phase by means of an example please.
How will the application on his device recognize this as the correct match?? Thanx..Harry
 

ceaser

Active Member
Licensed User
Hi Harry

I hide the number that the user entered (which I gave the user) somewhere on the PDA in a file. But this the user does not know.

When the program starts, it reads the Device ID and applies this to a formulae that is in the program. The program then takes this number and compares it to the number that is stored in the file.

If there is no number in the file or the numbers do not match, the program will ask for a registration number before it will continue.

If the numbers match, the program continues.

You must watch out, some PDA's return letters as well (i.e. Workabout from Psion). What I do is to convert the letters to ASCII characters before entering them in my formulae.

Label14.Text=SubString(Hardware1.GetDeviceID,0,28)
'label14.Text="324138331122334455"
'label14.Text="FF08FFF7-FF04-46CF-"
NewNo=""
For i=0 To StrLength(Label14.Text)-1
If IsNumber(SubString(Label14.Text,i,1))=True Then
TempNo=SubString(Label14.Text,i,1)
NewNo=NewNo & TempNo
Else
TempNo=Asc(SubString(Label14.Text,i,1))
NewNo=NewNo & TempNo
End If
Next

I hope this will help.

Regards
Michael
 

Cableguy

Expert
Licensed User
Longtime User
Hi,

This issue has been discussed in previous ocasions....
And basically there is not a defenite way to do it...
The Device ID is not implemente in some devices, as it was not a mandatory feature, and the IMEI is only available on the Phone-enabled devices...
One of the ways discussed was to have either a trial version, with a time-limit stant, that upon instalation, setted a time stamp anywere on the device, in the regestry or a file...
and each time the app was started, compared the actual system time with the time stamp...
Another way would be to do something like M$ has done, and generate a code, based on user input...
The send that code to the app deeloper,wich would then generate a second code...
The user would then input the code and umblock the app...
But these are just some ideas...
No solution is defenitive.
 
Top