HERE Technologies LogoHERE
HERE Technologies LogoHERE
HERE Technologies LogoHERE
SDKs & dev tools

5

14 July 2025

How to Use Road Shields with the HERE SDK

Background

A few months ago, during a weekend test drive to troubleshoot a route deviation issue, I unexpectedly missed a no-entry sign near a construction site. One wrong turn later, I found myself heading down a narrow one-way road—straight into oncoming traffic. It was a tense moment that drove home a simple yet powerful truth: smart navigation isn't just about knowing where to go—it’s also about knowing what to avoid. No matter how intelligent your routing or navigation engine is, real-world driving still depends on physical road cues—and ignoring a critical sign can lead to serious consequences.

That’s exactly where the HERE SDK steps in to help to improve your navigation experience. With built-in support for road sign warnings, you can make your app smarter, safer, and more situationally aware—giving your users the right information at just the right time.

Hence, when driving along a route, it's often helpful to know which road signs are coming up. In many scenarios—especially for specialized vehicles like trucks, knowing certain road sign information can be critical for safe and efficient travel. In this blog post, we'll walk through how to set up and use the RoadSignWarningListener with the HERE SDK for Android (Navigate Edition), customize filters based on vehicle type, and handle the RoadSignWarning notifications you receive.

Overview

The HERE SDK provides the ability to detect and receive notifications for road signs—often referred to as shields. These signs can include various categories and types, which are exposed through RoadSignCategory and RoadSignType. However, the HERE SDK itself does not provide any images for these signs. Instead, the listener delivers the type of the sign and other details, allowing you to handle the visuals in your own application or rely on text information if needed.

How it works

The RoadSignWarningListener is responsible for emitting RoadSignWarning events. Each RoadSignWarning event informs you about:

  • RoadSignType: The type of road sign. e.g., STOP_SIGN, NO_ENTRY, etc.

  • RoadSignCategory: The road sign’s category.

  • signValue: Optional text printed on the physical sign value.

  • distanceToRoadSignInMeters: The distance in meters to (or from) the road sign.

  • DistanceType: Whether the sign is upcoming (AHEAD) or has just been passed (PASSED).

  • SegmentReference: The reference to the segment where the road sign is located.

Additionally:

  • The listener does not give a precise physical location for the sign on the map. However, you can determine when to notify the user based on the distance remaining until the sign is reached.

  • Not all road signs are supported, and signs such as speed limits are available via a separate SpeedLimitListener.

  • The RoadSignWarning event triggers exactly two times:

    1. When DistanceType is AHEAD and distanceToRoadSignInMeters is > 0.

    2. When DistanceType is PASSED and distanceToRoadSignInMeters is 0.

RoadSignType: See which types of road signs are ahead

Example of an upcoming bear crossing area road sign warning

The HERE SDK provides various RoadSignType values that can be retrieved from RoadSignWarning events. A RoadSignType classifies road signs that can appear along a road. In general, the visual appearance of the road signs can differ across countries. However, some signs are standardized and look the same in all countries, such as STOP_SIGN. The list of available RoadSignType values can be found here.

Note that the HERE SDK only informs on which signs are along the road while driving, it does not provide an evaluation if a shield currently applies. For example, a shield can warn on slippery roads or animal crossings, but it's always the driver's responsibility to check the actual situation and road conditions carefully.

Filtering which signs to receive

With RoadSignWarningOptions you can set a filter on which shields you want to get notified.

Some examples of priority road signs (the visuals are not included in the HERE SDK)

Note that not all road shields are included. RoadSignType lists all supported types. For example, road signs showing speed limits are excluded, as these shields can be detected with the dedicated SpeedLimitListener.

By default, you might receive multiple road sign warnings that are irrelevant to your use case. For instance, if your application is targeted at truck drivers, you can set up the listener to only notify you of signs that are relevant for trucks.

Use RoadSignWarningOptions to specify a custom filter based on vehicle types. This can help avoid cluttering your application with unnecessary events.

RoadSignWarningOptions roadSignWarningOptions = new RoadSignWarningOptions();
roadSignWarningOptions.vehicleTypesFilter = Arrays.asList(
RoadSignVehicleType.TRUCKS,
RoadSignVehicleType.HEAVY_TRUCKS
);
visualNavigator.setRoadSignWarningOptions(roadSignWarningOptions);

RoadSignWarningOptions roadSignWarningOptions = new RoadSignWarningOptions();
roadSignWarningOptions.vehicleTypesFilter = Arrays.asList(
RoadSignVehicleType.TRUCKS,
RoadSignVehicleType.HEAVY_TRUCKS
);

visualNavigator.setRoadSignWarningOptions(roadSignWarningOptions);

The above code snippets sets a filter to get only road shields relevant for TRUCKS and HEAVY_TRUCKS. Therefore, a road sign warning of type YIELD_TO_BICYCLES would be filtered out.

Implementing the road sign warning listener

After you set your filter, you can implement the RoadSignWarningListener to handle the incoming events. Below is an example that logs the road sign’s distance, type, and (if available) text printed on the physical road sign.

JavaScript
// Notifies on road shields as they appear along the road.
visualNavigator.setRoadSignWarningListener(new RoadSignWarningListener() {
@Override
public void onRoadSignWarningUpdated(@NonNull RoadSignWarning roadSignWarning) {
if (roadSignWarning.distanceType == DistanceType.AHEAD) {
Log.d(TAG, "A RoadSignWarning of road sign type: " + roadSignWarning.type.name()
+ "ahead in (m): " + roadSignWarning.distanceToRoadSignInMeters);
} else if (roadSignWarning.distanceType == DistanceType.PASSED) {
Log.d(TAG, "A RoadSignWarning of road sign type: " + roadSignWarning.type.name() + " just passed.");
}
if (roadSignWarning.signValue != null) {
// Optional text as it is printed on the local road sign.
Log.d(TAG, "Road sign text: " + roadSignWarning.signValue.text);
}
}
});

For more road sign attributes, please check the API Reference.

The above implementation of the RoadSignWarningListener can be found in the Navigation example app on our GitHub page.

Interested in more?

Check out the documentation of the HERE SDK for Android to explore additional road attributes and other powerful navigation features—such as speed limit warnings and route progress tracking.

Happy coding and safe driving!

Portrait of Abhishek Kumar

Abhishek Kumar

Software Engineer II (R&D)

Share article