How to monitor HERE SDK API usage, network traffic consumption, and transferred data
Short Description
Learn how to enable and retrieve usage statistics from the HERE SDK to monitor network traffic consumption, transferred bytes, API usage, and request counts. This can help with application monitoring, debugging, usage transparency, and compliance reporting across Android, iOS, and Flutter implementations.
How can I track HERE SDK network traffic and data usage in my application?
Symptoms / Triggers
You may need this article if:
You want to understand how much network traffic is generated by the HERE SDK.
You need visibility into API requests performed by the SDK.
You are investigating unexpected mobile data usage.
You require usage reporting for legal, privacy, compliance, or auditing purposes.
You need to collect statistics about SDK feature usage in your application.
Your organization requires transparency regarding data exchanged between the HERE SDK and HERE backend services.
Quick Answer
The HERE SDK provides a Usage Statistics API that allows applications to collect information about SDK-generated network traffic, including transmitted bytes, received bytes, request counts, and SDK feature usage. To access these statistics, usage reporting must be enabled during SDK initialization and the collected statistics can then be retrieved programmatically.
Note: The Usage Statistics API was first introduced in HERE SDK Navigate 4.15.1 and remains available in current SDK releases.
Detailed Explanation
The Usage Statistics feature provides transparency into the network activity generated by the HERE SDK. Once enabled, your application can retrieve information about:
SDK features generating network traffic
Number of requests performed
Bytes sent to HERE services
Bytes received from HERE services
Network usage associated with specific SDK functionality
This information can be useful for:
Application diagnostics
Usage monitoring
Data consumption analysis
Compliance and privacy reviews
Internal reporting and auditing
Android Example
1. Enable usage statistics during SDK initialization:<br /> val sdk:SDKNativeEngine = SDKNativeEngine.getSharedInstance()!! sdk.enableUsageStats(true)<br />
2. Retrieve collected network statistics:<br /> val usageStats = SDKNativeEngine.getSharedInstance()!!.sdkUsageStats usageStats.forEach { usageStat -> Log.d(TAG," Feature ${usageStat.feature}") usageStat?.networkStats?.forEach { networkstat -> Log.d(TAG, " Method name - ${networkstat.methodCall}"+" Received - ${networkstat.receivedBytes}"+" Sent - ${networkstat.sentBytes} "+" Request Counter ${networkstat.requestCounter}") } }<br />
The example above demonstrates how to retrieve information about SDK feature usage, data transfer volumes, and request counters.
Applies To:
HERE SDK Navigate for Android, iOS, and Flutter.
Related Documentation
HERE SDK Android Usage Statistics Overview
HERE SDK iOS Usage Statistics Overview
HERE SDK Flutter Usage Statistics Overview
UsageStats API Reference
Updated 3 days ago