Select to view content in your preferred language

How to use license string to remove watermark?

1696
6
Jump to solution
04-29-2021 02:22 AM
FatmaAkdemir
Occasional Contributor II

I am using ArcGIS Runtime SDK for Qt C++ version 100.8. I purchased a runtime license string like this format: "runtimestandard,1000,rud0002xxxxx,none,7RC63PJxxxxxxxxx"

How can I use this code to remove watermark? How does it work if the PC is not connected to internet?

0 Kudos
1 Solution

Accepted Solutions
JamesBallard1
Esri Regular Contributor

Hi @FatmaAkdemir ,

You should be able to use ArcGISRuntimeEnvironment::setLicense to set the license string and then ArcGISRuntimeEnvironment::initialize() to initialize the environment and make sure it worked. You need to do this early on in main before your GeoView is displayed and renders anything.

We provide this boilerplate code example in our templates, which may help to get you going. This is in main.cpp, early on in the app. Uncomment the relevant sections and this should help to get you going.

  // Production deployment of applications built with ArcGIS Runtime requires you to
  // license ArcGIS Runtime functionality. For more information see
  // https://links.esri.com/arcgis-runtime-license-and-deploy.

  // ArcGISRuntimeEnvironment::setLicense("Place license string in here");

  //  use this code to check for initialization errors
  //  QObject::connect(ArcGISRuntimeEnvironment::instance(), &ArcGISRuntimeEnvironment::errorOccurred, [](const Error& error){
  //    QMessageBox msgBox;
  //    msgBox.setText(error.message);
  //    msgBox.exec();
  //  });

  //  if (ArcGISRuntimeEnvironment::initialize() == false)
  //  {
  //    application.quit();
  //    return 1;
  //  }

  

https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-arcgisruntimeenvironment.html#...

https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-arcgisruntimeenvironment.html#...

 

View solution in original post

6 Replies
JamesBallard1
Esri Regular Contributor

Hi @FatmaAkdemir ,

You should be able to use ArcGISRuntimeEnvironment::setLicense to set the license string and then ArcGISRuntimeEnvironment::initialize() to initialize the environment and make sure it worked. You need to do this early on in main before your GeoView is displayed and renders anything.

We provide this boilerplate code example in our templates, which may help to get you going. This is in main.cpp, early on in the app. Uncomment the relevant sections and this should help to get you going.

  // Production deployment of applications built with ArcGIS Runtime requires you to
  // license ArcGIS Runtime functionality. For more information see
  // https://links.esri.com/arcgis-runtime-license-and-deploy.

  // ArcGISRuntimeEnvironment::setLicense("Place license string in here");

  //  use this code to check for initialization errors
  //  QObject::connect(ArcGISRuntimeEnvironment::instance(), &ArcGISRuntimeEnvironment::errorOccurred, [](const Error& error){
  //    QMessageBox msgBox;
  //    msgBox.setText(error.message);
  //    msgBox.exec();
  //  });

  //  if (ArcGISRuntimeEnvironment::initialize() == false)
  //  {
  //    application.quit();
  //    return 1;
  //  }

  

https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-arcgisruntimeenvironment.html#...

https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-arcgisruntimeenvironment.html#...

 

FatmaAkdemir
Occasional Contributor II

Hi @JamesBallard1 ,

Thank you for this detailed reply. I was also wondering if I could use this license string in 100.8 while it was given for 100.9?

0 Kudos
Nicholas-Furness
Esri Regular Contributor

Yes. You can use the license string with any 100.x version of Runtime.

Nicholas-Furness
Esri Regular Contributor

To answer the second part of your question, if you are using a license string, as in your question, then being connected to the internet or not doesn't have an impact (the other way to license your app is by logging in with a named user, and then the network connection becomes important). See this page for more details on licensing your app.

FatmaAkdemir
Occasional Contributor II

Hi @Nicholas-Furness ,

They also sold us an annual developer subscription code ( starting with ADS ) alongside the runtime license. What is the purpose of Developer Subscription Code? What would we lose if we removed that code from our plan?

0 Kudos
Nicholas-Furness
Esri Regular Contributor

Hi @FatmaAkdemir,

Good question.

There are two things in play here. Your paid developer subscription level (the ADS code), and your app's functionality (the license string). The ADS code is unrelated to the license string.

The ADS (ArcGIS Developer Subscription) code identifies your paid subscription and can be used at My Esri to link your paid developer subscription with your My Esri page, so you can have easy access to the various resources (downloads, tools, support, etc.) that are available to you, depending on the paid subscription level.

The license string is only used in your Runtime app. It removes the watermark and enables specific Runtime functionality in your app when it is released to production. The Runtime capabilities your production Runtime app depends on the license string you use (Lite, Basic, Standard, or Advanced). Note that everyone gets a free Lite license string to use in their apps. Your Standard license string enables additional capabilities as described at the link above.

Without a license string, you are in development and test mode: all Runtime capabilities are enabled but you will see the watermark. You are required to use a license string to release any Runtime app.

Hope that helps.

0 Kudos