Select to view content in your preferred language

Android Runtime SDK 100 - License with a Named User Account

785
1
01-24-2018 04:48 AM
betmrf
by
New Contributor

Hello, we would like to licence our application with a named user account. When we run the code below we get "portal.portalInfo must not be null" error. Is there a special setting in portal-side for this? Thanks.

//license
val credential = UserCredential("username", "pass")
val portal = Portal("PortalURL")
portal.credential = credential
portal.loadAsync()
portal.addDoneLoadingListener({
    try{
        // get license info from the portal
        val licenseInfo = portal.portalInfo.licenseInfo
        // Apply the license at Standard level
        ArcGISRuntimeEnvironment.setLicense(licenseInfo)
        //do something...

    } catch (e: Exception){
        Log.d("ERROR:", e.message)
    }
})
0 Kudos
1 Reply
EricBader
Honored Contributor

It might be null because Runtime Standard can only be unlocked via a license string from a deployment pack. Unlocking Standard from a Named User account is not supported yet: License your app—ArcGIS Runtime SDK for Android | ArcGIS for Developers . Deployment packs with license strings can be obtained through your regional office or distributor. 

0 Kudos