Select to view content in your preferred language

Kotlin Maps - Android Network Routing

244
4
09-25-2025 02:49 PM
Dhruvin
Emerging Contributor

Is there a way to override network information or network routing for map tile downloading and other services that is automatically using data when the map is loaded and other interactions than the default route ?

 

0 Kudos
4 Replies
VenkataKondepati
Regular Contributor

You can’t override the default routing for map tile downloads or service calls. Those requests always use the system’s configured network path. The supported way is to control access through proxies, traffic rules, or enterprise gateways, not within ArcGIS itself. If you need custom routing (e.g., for cost control or compliance), place ArcGIS traffic behind a reverse proxy/load balancer where you can define those network rules.

0 Kudos
GuntherHeppner
Esri Contributor

@Dhruvin - is your question related to ArcGISOnline services, i.e. services hosted on arcgis.com or related to services hosted on ArcGIS Enterprise? For the latter, the information from @VenkataKondepati applies. For services hosted on arcgis.com, a forward proxy would need to be configured. The Kotlin SDK does not support configuring forward proxies yet (as of 200.8.0). We are looking into support for forward proxies in a future release.

Dhruvin
Emerging Contributor

Hey Gunther,

Thanks for the reply.

My question is not limited to ArcGISOnline or ArcGIS Enterprise, but all network traffic initiated by the ESRI Kotlin SDK itself. The ask is if there is an API to tell ESRI Kotlin SDK to route network traffic via a specific transport type or notify the sdk of when internet is available or not. 

Generally in an android app you have control over the network requests but when using the ESRI Kotlin SDK we lose that control once we start using any ESRI API thru the SDK.

0 Kudos
GuntherHeppner
Esri Contributor

The ask is if there is an API to tell ESRI Kotlin SDK to route network traffic via a specific transport type or notify the sdk of when internet is available or not. 

Can you elaborate on:
- What do you mean with transport type?
- Can you explain more about your use case on a high level, i.e. what problem are you trying to solve?

or notify the sdk of when internet is available or not. 

There is no way to notify the SDK about internet availability. If the network connection is down, requests made by the SDK will fail and the app needs to respond this in whatever way is appropriate for your use case. For example, a map may fail to load due to network connectivity being interrupted. An app can check the load status of a map and respond to load errors. Further, an app might check Android's Connectivity Manager for network state and make calls into the Maps SDK depending on that connectivity state.

0 Kudos