How to set license on ArcGIS runtime android 100

1324
5
05-24-2017 06:28 AM
JohnMcoy
New Contributor III

Hello, 

Could anyone explain where to paste this code...   it's so frustrating me... 

// license with a license key 
ArcGISRuntimeEnvironment.setLicense("runtimelite,1000,###########,day-month-year,####################");

I pasted here, http://prntscr.com/fbk1sy . But nothing changes. 

Thx for any help ! 

0 Kudos
5 Replies
AlexanderNohe1
Occasional Contributor III

I would paste that in your application class as that is used to maintain global application state:

Application | Android Developers 

Are you finding that when you paste your license code that it does not authorize it at the correct license level? (looks like you are trying to use a basic license from code pasted but looks like you are showing a lite license in sample above)

Are you able to authorize it at a lite level to see the watermark disappear?  Perhaps it is an issue with the license string itself.

JohnMcoy
New Contributor III

Thanks for replay Alexander !  If I paste this code in class, then i`m  getting error...  and setLicense becomes red... 

0 Kudos
AlexanderNohe1
Occasional Contributor III

Did you remember to add the library to your project (usually via Gradle)?

0 Kudos
JohnMcoy
New Contributor III

Thanks for your response Alexander!  

But here is unexplained where I have to put this code, and what libraries needs to this... http://prntscr.com/fbp1oz   Could you explain me, or show some sample... I would greatly appreciate. 

Waiting the answer.

0 Kudos
AlexanderNohe1
Occasional Contributor III
  1. Were you able to follow this guide to make sure that you have the dependencies properly configured in your application?

    Develop your first map app—ArcGIS Runtime SDK for Android | ArcGIS for Developers 

  2. Do you know you have a valid license string?

    Here is where the license can be found for a lite license level:  Licensing your ArcGIS Runtime App | ArcGIS for Developers 

    And if you need a higher license level, you can contact customer service and purchase one.

  3. It says in that documentation that you need to call setLicense before any runtime code is called.  You can do this by either calling setLicense in your application class or in your main activity in the onCreate function override.


  4. In your original message, you said that you were expecting something to change?  What exactly did you expect to change when you ran the licensing code?