Tracking [feature] usage count

Any way to track the number of times the user takes an action?

I'd like to sell a block of 1000 feature uses to a user, and then have them chip away at that to-be-used count each time they do something in my app.

Simple example, an SMS system where a block of 1000 uses is $10, each time they send an SMS their balance drops (e.g. from 1000 to 999). A prepaid 'kitty' of feature usage. When they run out they need to buy another bunch of uses.

Possible with LimeLM?

Any way to track the number of times the user takes an action?

Yes, use custom license fields. Have a field that stores the limit. Then, in your app, you track how many of that limit have been used.

Does that make sense?

I'd really hope to have LimeLM manage it, for the same reason that I use LimeLM to manage trial expiration dates.My post wasn't clear about one thing: the updated usage count needs to survive app restarts.I don't want to store the values locally between runs because then I'd have to worry about tampering with the file/registry entry/etc.

I haven't tried the api to write field values:http://wyday.com/limelm/help/license-features/#web-apiCan I use it to rewrite the field value each time the feature is used?(I wouldn't want to have the the feature get used 100 times, counting locally, then have the app exit before the server version is updated with a call to set the value)

--Mike.

Can I use it to rewrite the field value each time the feature is used?

Yes. Or you can write another field like "widgets_used".

Note: don't make the web API call directly from your app. Instead call a script on your website which then makes the call to the LimeLM web API. Why? Because the web API key is like a password to your account -- if you embed it in your app then you're giving all your customers access to your LimeLM account.

Make sense?

Understand your suggestion, but I guess you now see why I was hoping "set custom field value" would be part of the Lime API, which I call from my C++ app. You've already got the secure connection up.

I would prefer not to write and ping my own web services - the point of Lime to me is that it lets me concentrate on the app and have somebody else worry about this sort of thing...?

Can such a method be added to the Lime API? [please!]

--Mike.

Understand your suggestion, but I guess you now see why I was hoping "set custom field value" would be part of the Lime API

There's is: http://wyday.com/limelm/help/api/limelm.pkey.setDetails/

which I call from my C++ app. You've already got the secure connection up.

You can call it directly from your app, but you shouldn't. Why? Because even though the connection may be secure, the user's computer will still have unrestricted access to your LimeLM account. Make sense? Your app will have the "password". The "password" is readable by anyone with limited technical knowledge.

This is why you need to split the process into 2 parts:

Part 1: Put a simple script on your website that calls limelm.pkey.setDetails and increments or decrements some field value for some passed in product key.

Part 2: Your app make a call to this script, presumably passing in the product key so the script knows which key to make the changes to.

Does that make sense? It's about security, filtering, and proper design.

Okay

I guess I'm unclear on why IsGenuineEx() can be called from C++ but pkey.setdetails is a web method.

Both require the client software to communicate sensitive things to the LimeLM server..?

If pkey.setdetails is a web method then I agree it's best to do as you suggest - my question is, if pkey.setdetails was exposed as a C++ call instead of a web method, wouldn't it be as safe as calling IsGenuineEx()?

my question is, if pkey.setdetails was exposed as a C++ call instead of a web method, wouldn't it be as safe as calling IsGenuineEx()?

No, because that has the ability to set details of the product key. (Where IsGenuineEx only has read only ability of the product key).

It's like saying the New York Times allows us to read their website, so why don't they allow anyone to write to the website wherever they wanted? The answer is that their website would be filled with spam, p0rn, and polemics faster than you could say "that's a terrible idea".

Similarly, you want the user to be able to read the data for a product key (or, at least, the data you make visible to the user), but you shouldn't want to give them free access to change anything they want about the product key. For instance, you don't want to give the user the ability to change the custom license field to a very big value (thus negating the whole thing you're trying to do).

Does that make sense?

So, then, how do you set a custom license field value from within your app? Well, it's already been said a few times in this thread. Have your app call a script on your website. Have the script call LimeLM. The script is the filter point. It has access to your LimeLM account and can do just what you tell it to do.

[thought I had posted a response but it seems to have been lost?]

I appreciate your patience with my questions

What about exposing a Decrement(FieldName) method in the C++ API?

If the user found and called this method, it would have the effect of shortening the life of their product, so they wouldn't do it. No point.

[I'm trying to avoid writing/maintaining a web method - I think your point is that the incremental cost of adding a new service to a site I'm already running is minor - but at the moment I have zero server-side code running, so the cost of adding a first service is relatively high]

---Mike.

Maybe in the future we'll have predefined configurable actions, but in the meantime just use the web API.