Package com.mapfactor.sdk.imports
Interface ImportsManager
public interface ImportsManager
Imports manager
- Since:
- 1.5
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Incremental import data adding listenerstatic interface
Incremental import category creation listenerstatic enum
Creating incremental import category resultstatic interface
Import categories list ready listener -
Method Summary
Modifier and TypeMethodDescriptionvoid
addIncrementalImportData
(String categoryName, List<ImportData> importDataList, ImportsManager.AddIncrementalImportDataListener listener) Add data to specified incremental importvoid
createIncrementalImportCategory
(String categoryName, String icon, float hotSpotX, float hotSpotY, ImportsManager.CreateIncrementalImportCategoryListener listener) Create incremental import category.void
getImportCategories
(ImportCategory.Type importType, ImportsManager.ImportCategoriesListener listener) Get imported categoriesvoid
importFile
(List<android.net.Uri> sourceUris, boolean overwriteExisting, FileImportListener importListener) Import app data from specified source.
-
Method Details
-
importFile
void importFile(@NonNull List<android.net.Uri> sourceUris, boolean overwriteExisting, @NonNull FileImportListener importListener) Import app data from specified source. This is a one-time import and cannot be modified later. Data is deleted viaAppDataManager.deleteAppData(List, DataDeleteListener)
.- Parameters:
sourceUris
- list pf source URIs to import data fromoverwriteExisting
- true to overwrite files that already exists in SDK data directoryimportListener
- listener called on import status change- Since:
- 1.5
-
createIncrementalImportCategory
void createIncrementalImportCategory(@NonNull String categoryName, @Nullable String icon, @FloatRange(from=0.0,to=1.0) float hotSpotX, @FloatRange(from=0.0,to=1.0) float hotSpotY, @NonNull ImportsManager.CreateIncrementalImportCategoryListener listener) Create incremental import category. UseaddIncrementalImportData(String, List, AddIncrementalImportDataListener)
to add data to it.- Parameters:
categoryName
- category nameicon
- category map icon. PNG file is required, 64x64 pixels recommended.hotSpotX
- icon hot spot in horizontal dimension defining precise icon placement. Value of 0.0 means that left side of the icon will be on the icon coordinate, 0.5 middle of the icon and 1.0 right side of the icon. Ignored when icon parameter is null.hotSpotY
- icon hot spot in vertical dimension defining precise icon placement. Value of 0.0 means that top side of the icon will be on the icon coordinate, 0.5 middle of the icon and 1.0 bottom side of the icon. Ignored when icon parameter is null.listener
- listener called when category creation is finished- Since:
- 1.5
-
addIncrementalImportData
void addIncrementalImportData(@NonNull String categoryName, @NonNull List<ImportData> importDataList, @NonNull ImportsManager.AddIncrementalImportDataListener listener) Add data to specified incremental import- Parameters:
categoryName
- import category previously created bycreateIncrementalImportCategory(String, String, float, float,CreateIncrementalImportCategoryListener)
importDataList
- list of data to importlistener
- listener called when adding the data is finished- Since:
- 1.5
-
getImportCategories
void getImportCategories(@Nullable ImportCategory.Type importType, @NonNull ImportsManager.ImportCategoriesListener listener) Get imported categories- Parameters:
importType
- import type. All import types if null.listener
- listener to receive imported categories list- Since:
- 1.5
-