If a license has been activated on 3/3 devices and you try to activate it on a fourth device, you get an ELAActivationLimitException (which is correct). You can then show a message in your app telling the user they have reached the activation limit and need to deactivate some devices or buy more activations (or whatever).
However, if a license has only been activated on 1/3 devices and you try to activate it on a second device, but the LexActivator customer plan you purchased has reached the maximum number of activations and/or licenses, then you also get an ELAActivationLimitException. If you now show the user a message telling him he needs to buy more activations, you would be wrong. The problem is with your plan - not with the allowed activations on the user’s license.
Question: Is there no way that ActivateLicense could return a different error type for plan-related limit issues (e.g.: ELAPlanLimitException)?
I don’t want to be telling users that they have run out of activations when in fact it’s my own plan that has reached its limit, but at the moment there’s no way to differentiate between the two.
Yes, I know that I should be keeping an eye on my plan limit, but that’s also not so simple. The dashboard on the portal shows a Licenses count and an Activations count. If my plan limit is 10 and I’ve issued ten licenses but only 5 of them have been activated, the Activations count in the portal will show 5 so I think I’m still fine, but if I try to activate another license in my app it will fail with an ELAActivationLimitException, because I have 10 licenses and licenses are seen as activations even if they have not been activated on any devices. The Activations count in the portal is therefore not accurate and should rather display the aggregate of the number of licenses issued plus the number of additional activations. That would allow me to see how far I really am from running into my plan limit.
PS: If your plan limit is 10 and you’ve created 10 licenses with a total of 5 activations and you try to activate one of the already activated licenses on a second device, the activation will fail (because that would have taken you to 11 total activations). However, if you’ve only created 6 licenses and you’ve activated 5 of them twice (so 10 total) and you then try to activate the last one, it will succeed and will activate an 11th license. It will then only fail when attempting to activate a 12th. Not sure if this is just “leniency” by design, or a bug.
PPS: Also, in the portal, if your plan limit is 10 and you’ve created 10 licenses and you try to add an 11th it won’t let you, telling you that you’ve reached your plan limit instead. If however you’ve only created 9 licenses so far and you then click Add, and in the new license window you set the number of licenses to create to 10 for example, it will create all 10 licenses for you - no problem. You now have 19 licenses on a 10-license plan (Sure, it won’t let you activate them, but it should probably still be looked at).