ArcGIS Maps SDK for Kotlin enables you to build mapping applications for Android platform phones and tablet devices. Follow the steps below to ensure you have licensed the capabilities that your app uses and that you understand associated costs.
- License the capabilities you included in the app. Refer to the License levels and capabilities topic to determine the license level you require, and to the Get a license topic to learn how to acquire a license.
- Attribute Esri in your app.
- If you deploy content or services from ArcGIS location services, see the FAQ topic in the Mapping and location services guide.
- Learn about Deploying local data, including projection engine files, ENC style directory, and deploying specialized symbols.
If your app is licensed at the Standard level or above and you would like to deploy it via an app store or marketplace, let us know by emailing runtimelic@esri.com.
When you create the APK for your application, consider targeting your app for a specific architecture to reduce the size of your APK.
Attribute Esri in your app
Esri requires that when you use an ArcGIS Online basemap, Esri data services, or Esri API technology in your app, you must also include Esri attribution. There are specific requirements for attribution that you may be required to address in your app depending on how your app is built and the data it uses. These requirements are outlined in detail in the Attribution in your app topic.
Deploy local data
Deploying data locally allows access to that data without a network connection. Local data refers to files that are not part of the Android application package deployment. Some examples of files typically used as offline data are mobile map packages, runtime geodatabases, offline locators and network datasets, and tile packages.
Local offline data can be downloaded while the device has a network connection—for example when tile packages are generated from the device and downloaded, or when the "desktop pattern" is used to create mobile map packages and store them in a portal for download to the device. Alternatively, data can be copied to a device's internal storage (also known as "sideloading") using a tool such as the Android Debug Bridge (ADB) or deployed using an expandable memory slot. Copying to a device can be useful when files are prepared using ArcGIS Pro or ArcGIS Desktop and when deploying the same files to many devices.
Projection engine files
If your app is using grid-based transformations, deploy the required Projection Engine files to the device by copying (sideloading) them or downloading them directly onto the device.
ENC (electronic navigational charts) style directory
If your application displays EncLayer
, deploy the hydrography
directory, available for download from the downloads page.
Deploying specialized symbols
You may need to deploy specialized symbols, such as military symbol dictionaries, for use with your ArcGIS Maps SDK for Kotlin app.
You have two options for including these symbols in your deployment.
- You can download the Military Dictionary Symbol Styles that Esri hosts in ArcGIS Online and include them in your app deployment. You will need to add logic in your app to locate and use the files, as needed.
- Add logic to your app that prepares the app for offline use by downloading the files and storing them locally. You can access these resources when your user is online either by programmatically downloading them or accessing them as portal items, reading their contents, and storing them locally. The following code example shows how to access some of the hosted military symbol items.
// create the military symbol portal items (use their unique item IDs)
val itemMil2525c = PortalItem("https://www.arcgis.com/home/item.html?id=ef95f95470db437f80ea764a9d05203b")
val itemMil2525d = PortalItem("https://www.arcgis.com/home/item.html?id=c78b149a1d52414682c86a5feeb13d30")
// read the data from the items
downloadPortalItem(itemMil2525c, destinationFolder)
downloadPortalItem(itemMil2525d, destinationFolder)
}
private suspend fun downloadPortalItem(portalItem: PortalItem, destinationLocation: File) {
lifecycleScope.launch {
// load the portal item
portalItem.load().getOrElse { error ->
return@launch showError("Error loading portal item: ${error.message}")
}
// get the data of the portal item
val portalItemData = portalItem.fetchData()
val byteArray = portalItemData.getOrElse { error ->
return@launch showError("Error fetching portal item data: ${error.message}")
}
// get the byteArray of the portal item
val byteArrayInputStream = ByteArrayInputStream(byteArray)
val data = ByteArray(1024)
var downloadCount: Int
downloadCount = byteArrayInputStream.read(data)
while (downloadCount != -1) {
downloadCount = byteArrayInputStream.read(data)
}
// set up the file at the download path
val destinationFilePath = destinationLocation.path + File.separator + portalItem.name
val provisionFile = File(destinationFilePath)
// create file at location to write the PortalItem ByteArray
provisionFile.createNewFile()
// create and write the file output stream
val writeOutputStream = FileOutputStream(provisionFile)
writeOutputStream.write(byteArray)
writeOutputStream.close()
}
}
Export compliance and restrictions on cryptography
When you submit your app to an app store (such as Apple's App Store, Google Play Store, or the Microsoft Apps store) your app may be stored on a server in the United States and is therefore subject to US export laws, regardless of where you or your organization are based. The Bureau of Industry and Security, under the United States Department of Commerce, regulates the export of technology that uses encryption. In some cases, the use of encryption may be considered an export of encryption software, subjecting your app to US export compliance requirements. Because the ArcGIS Maps SDK for Kotlin uses encryption libraries provided by the underlying operating system, it does not require the declaration of non-exempt encryption when submitted as part of your app.
It is the responsibility of the app developer (and publisher) to make sure that an app complies with all applicable laws and regulations.
The following links provide more information about US export compliance and restrictions on cryptography: