Check Runtime License Level

2712
2
06-14-2012 10:05 AM
Labels (1)
AndrewPurkis
New Contributor III
Hi,

Is there a way to check what the current settings for the Runtime license level (Basic or Standard) + Extensions are?

It would be nice to see it in the ArcGISRuntime class.

Andrew Purkis
0 Kudos
2 Replies
MichaelBranscomb
Esri Frequent Contributor
Hi,

No, it's not possible via the API to check the license level. We did consider adding a property or enum for this purpose but came to the decision that it is actually unnecessary:

- Deployment licenses do not expire, therefore the entire license file/string-array is either valid or invalid.
- Deployment licenses are specific to an application, therefore when you deploy your application you only deploy one license file/string with that application, i.e. the application is either licensed for everything in the license file or not at all.
- The license is initialized for the lifetime of the application and cannot be switched dynamically (nor would you want to - see above)
- As a developer you are are licensed for basic, standard and all extensions.
- Calling ArcGISRuntime.Initialize() will validate the license and raise an exception is the license is not valid.

With all this in mind we decided that it is not necessary to check the contents of the license - just to check that it is valid via the ArcGISRuntime.Initialize() method. However, we could reconsider for a future release if you have a specific requirement to check the license.

Cheers

Mike
0 Kudos
AndrewPurkis
New Contributor III
Thanks for the reply,

But I'm still a bit confused.

Up till now I've not paid to much attention to the licensing of the product. I've been storing a license string in a file (standard), read it in do a  ArcGISRuntime.SetLicense(license-file), then a  ArcGISRuntime.Initialize() and make sure it's initialized.

In our final product, we will be deploying some basic and some standard versions, and probably some with extensions. What I need is one executable for everything, and after I've run the Initialize, check the version to ensure I disable all functionality that doesn't apply based on the current license.

I ran some checks today, and in a development environment, everything is enabled, even if I run with a basic license.  It would be nice if when I set it to basic in development, it lets me know when I'm trying to initialize functionality, not covered by that license level.

As far as determining the license level, obviously, I can parse the data in the license string, and use that. But what bothers me with that is strings can easily be changed 2-3 years down the road, without realizing the consequences. An enum within ArcGISRuntime object would hopefully safeguard against that.

Thanks

Andrew
0 Kudos