Directories | |
| dart | |
| java | |
| kotlin | |
| objc | |
| swift | |
This directory contains comprehensive examples demonstrating the usage of the Navigine SDK's LocationListManager across all supported platforms.
The LocationListManager is responsible for downloading and managing the list of available locations from the server. It provides functionality for:
The main class for managing location list operations:
addLocationListListener() / removeLocationListListener() - Manage location list listenersupdateLocationList() - Force reload location list from servergetLocationList() - Get current cached location listInterface for receiving location list notifications:
onLocationListLoaded() - Called when location list is successfully downloadedonLocationListFailed() - Called when location list download failsRepresents basic information about a location:
id - Unique location identifierversion - Current location versionname - Location namedart/location_list_manager_example.dart - Complete example with all LocationListManager featuresjava/LocationListManagerExample.java - Java implementation with comprehensive API coveragekotlin/LocationListManagerExample.kt - Kotlin implementation using coroutines for async operationsobjc/LocationListManagerExample.h - Header file with interface declarationsobjc/LocationListManagerExample.m - Implementation with all LocationListManager methodsswift/LocationListManagerExample.swift - Swift implementation with modern syntax[platform_LocationListManager_addLocationListListener] - Adding location list listeners[platform_LocationListManager_removeLocationListListener] - Removing location list listeners[platform_LocationListManager_updateLocationList] - Force reloading location list[platform_LocationListManager_getLocationList] - Getting current location list[platform_LocationListListener_onLocationListLoaded] - Location list loaded callbacks[platform_LocationListListener_onLocationListFailed] - Location list failed callbacks[platform_LocationInfo_getId] - Getting location ID[platform_LocationInfo_getVersion] - Getting location version[platform_LocationInfo_getName] - Getting location nameThe examples demonstrate how to add multiple listeners to the same LocationListManager:
Proper listener management is crucial to prevent memory leaks:
The examples include simulation features for testing:
updateLocationList() method forces a fresh download from the server