How to Receive Dynamic EV Information in HERE mSDK

How to receive the dynamic EV information in mSDK

Overview

To access dynamic EV charging data in HERE Mobile SDK (mSDK), specific permissions and configuration steps are required.

---

  1. Enable EV Data Access (License Requirement)

    To receive dynamic EV data (via EVChargingPool), your SDK credentials must include EV data access permissions.

  • This feature is not enabled by default
  • It typically requires an additional commercial agreement / fee

    👉 Please contact your HERE Sales representative to request access.

    Reference:

https://docs.here.com/here-sdk/docs/android-routing-ev

---

2. Enable EV Data in SearchEngine
---------------------------------

To include EV charging information in search results, you must enable EV data using setCustomOption() before executing any search request:

searchEngine.setCustomOption("discover.show", "ev");

searchEngine.setCustomOption("browse.show", "ev");

searchEngine.setCustomOption("lookup.show", "ev");

📌 Notes:

  • These options only need to be set once
  • Must be called before invoking searchEngine.search()

    ---

Example: Search EV Charging Stations


Below is a simplified example using a category search query for EV charging stations.

Sample Code

Java

public void searchPlacesCategory(View view) {

List categoryList = new ArrayList<>();

// EV Charging Station category ID

categoryList.add(new PlaceCategory("700-7600-0322"));

CategoryQuery categoryQuery = new CategoryQuery(

categoryList,

new GeoCoordinates(25.051413311103417, 121.55398285809909)

);

int maxItems = 2;

SearchOptions searchOptions = new SearchOptions(LanguageCode.ZH_TW, maxItems);

// Enable EV data

searchEngine.setCustomOption("discover.show", "ev");

searchEngine.setCustomOption("browse.show", "ev");

searchEngine.setCustomOption("lookup.show", "ev");

searchEngine.search(categoryQuery, searchOptions, new SearchCallback() {

@Override

public void onSearchCompleted(@Nullable SearchError searchError,

@Nullable List list) {

if (searchError != null) {

Log.e("SearchError", searchError.toString());

return;

}

if (list == null) return;

for (Place result : list) {

Details details = result.getDetails();

// Check EV data availability

if (details.evChargingPool == null ||

details.evChargingPool.chargingStations.isEmpty()) {

continue;

}

// Example: retrieve connector type

String connectorType =

details.evChargingPool.chargingStations.get(0).connectorTypeName;

Log.i("EV_INFO",

result.getId() + " / " + connectorType);

// Display on map

mapView.getCamera().lookAt(result.getGeoCoordinates());

}

}

});

}



---

  1. Key Points
    -------------

  • EV dynamic data is available via:

    <br /> result.getDetails().evChargingPool<br />
  • Always check for null or empty values before accessing EV data
  • Data includes:
    + Charging station details
    + Connector types
    + Availability (if supported)

    ---

  1. Common Issues


IssueCauseSolution
No EV data returnedMissing permissionContact HERE Sales
evChargingPool is nullCustom options not setCall setCustomOption() before search
App crashNull pointer accessAdd proper null checks

Summary

To receive EV dynamic information in HERE mSDK:

1. ✅ Ensure your license includes EV data access
2. ✅ Enable EV data via setCustomOption()
3. ✅ Query EV charging stations (e.g., category ID 700-7600-0322)
4. ✅ Extract data from evChargingPool safely

~~