Deployment

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.

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.

  1. The ArcGIS for Defense group hosts the following ArcGIS Online items that contain .stylx files with military symbols. Use the support matrix to find and download the supported stylx file for your version of ArcGIS Maps SDK for Kotlin. Once downloaded, you can include the files in your app deployment. Logic in your app, of course, would be required to locate and use the included files as needed.
  2. 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.
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
        // 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:

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.