In MapEngine initialization I want to install all packages but I am stuck here installMapPackages(List packageIdList) from where can I find List packageIdList.
You should use the MapLoader#getMapPackages() API to retrieve the root MapPackage object. You can then use the MapPackage#getId() method to find the Id's of the countries/regions you wish to install. Note that the MapPackage object is not returned directly from the MapLoader#getMapPackages() call, but instead through a Listener object. You must provide your own MapLoader.Listener implementation and set it by way of the MapLoader#addListener(MapLoader.Listener listener) method before calling getMapPackages().
MapLoader#getMapPackages()
MapPackage
MapPackage#getId()
MapLoader.Listener
MapLoader#addListener(MapLoader.Listener listener)
getMapPackages()
For Example:
MapLoader.Listener mapLoaderListener = new MapLoader.Listener() { public void onUninstallMapPackagesComplete(MapPackage rootMapPackage, MapLoader.ResultCode mapLoaderResultCode) { } public void onProgress(int progressPercentage) { } public void onPerformMapDataUpdateComplete(MapPackage rootMapPackage, MapLoader.ResultCode mapLoaderResultCode) { } public void onInstallationSize(long diskSize, long networkSize) { } public void onInstallMapPackagesComplete(MapPackage rootMapPackage, MapLoader.ResultCode mapLoaderResultCode) { } public void onGetMapPackagesComplete(MapPackage rootMapPackage, MapLoader.ResultCode mapLoaderResultCode) { // This method will be called after MapLoader#getMapPackages() // is called // You can use the rootMapPackage object to find the Id's to // pass to installMapPackages() } public void onCheckForUpdateComplete(boolean updateAvailable, String currentMapVersion,String newestMapVersion, MapLoader.ResultCode mapLoaderResultCode) { } }; MapLoader mapLoader = MapLoader.getInstance(); mapLoader.addListener(mapLoaderListener); mapLoader.getMapPackages();
Further details here:
https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics/maps-offline.html
https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics_api_nlp_hybrid_plus/com-here-android-mpa-odml-maploader.html
https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics_api_nlp_hybrid_plus/com-here-android-mpa-odml-maploader-listener.html
https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics_api_nlp_hybrid_plus/com-here-android-mpa-odml-mappackage.html
1.4m articles
1.4m replys
5 comments
57.0k users