wood burning stoves 2.0*
The moose likes Android and the fly likes Licensing Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Licensing Question" Watch "Licensing Question" New topic
Author

Licensing Question

Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
I have a question about licensing. I am using ServerManagedPolicy that is provided in the sample application. If the user ever returned as licensed then I don't want to do any checks and simply allow. I don't understand the purpose of checking after we already know the user is licensed. Why do we have second "if" in the following code?

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Probably for the reason stated--looks like the value is cached, and they're making sure the value hasn't expired?
Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
Thanks for your reply. What I am trying to understand is what is the rationale for expiring a license. I think for most applications once they are licensed, then its license will not expire. I think all I need to do is add another variable to the cache which will determine the beginning of the trial period and then I can simply use that to determine if trial period has expired. Please let me know what you think.

Thanks
Imad
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
It's not the license that expires, it's the information on the device that the license is valid. The device checks in periodically with the license server, and in between it relies on cached information on the device. But eventually the information expires, and the app must be able to check in with the license server, or it will consider itself unlicensed. That's the case being handled here.
Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
Thanks for your reply Lester. I don't want to frustrate you with my stupid questions but one last one. It's more of a business question than a technical one. Once the license server responds with a response of "Licensed" (which I think it will only respond once application has been purchased) then I cache this response and use it for good. The only reason I would check the server again is when for some reason my cached response was wiped out.

So what is the business need for the device to check the license periodically with license server?

Thanks
Imad
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
The license might be withdrawn due to the client violating its terms and conditions, or it might be time-limited to begin with. Licenses are not generally a "turn it on once, and then it's good forever" thing.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Licensing Question
 
Similar Threads
MultiDimenaional Array sort
how to receive data in .jsp file from servlet in AJAX?
Tomcat Session Handling
iterating with a scriptlet, can't get the values into js arr
Problem With Algorithm Involving Recursion and String Manipulation