-
- All Implemented Interfaces:
-
android.os.IInterface,net.osmand.aidlapi.IOsmAndAidlInterface
public class IOsmAndAidlInterface.Default implements IOsmAndAidlInterface
Default implementation for IOsmAndAidlInterface.
-
-
Method Summary
Modifier and Type Method Description booleanaddMapMarker(AddMapMarkerParams params)Add map marker at given location. booleanremoveMapMarker(RemoveMapMarkerParams params)Remove map marker.If ignoreCoordinates is false the marker is only removed if lat/lon match the currently set values of the marker.If ignoreCoordinates is true the marker is removed if the name matches, the values of lat/lon are ignored. booleanupdateMapMarker(UpdateMapMarkerParams params)Update map marker.If ignoreCoordinates is false the marker gets updated only if latPrev/lonPrev match the currently set values of the marker.If ignoreCoordinates is true the marker gets updated if the name matches, the values of latPrev/lonPrev are ignored. booleanaddMapWidget(AddMapWidgetParams params)Add map widget to the right side of the main screen.Note: any specified icon should exist in OsmAnd app resources. booleanremoveMapWidget(RemoveMapWidgetParams params)Remove map widget. booleanupdateMapWidget(UpdateMapWidgetParams params)Update map widget.Note: any specified icon should exist in OsmAnd app resources. booleanaddMapPoint(AddMapPointParams params)Add point to user layer. booleanremoveMapPoint(RemoveMapPointParams params)Remove point. booleanupdateMapPoint(UpdateMapPointParams params)Update point. booleanaddMapLayer(AddMapLayerParams params)Add user layer on the map. booleanremoveMapLayer(RemoveMapLayerParams params)Remove user layer. booleanupdateMapLayer(UpdateMapLayerParams params)Update user layer. booleanimportGpx(ImportGpxParams params)Import GPX file to OsmAnd (from URI or file). booleanshowGpx(ShowGpxParams params)Show GPX file on map. booleanhideGpx(HideGpxParams params)Hide GPX file. booleangetActiveGpx(List<ASelectedGpxFile> files)Get list of active GPX files. booleansetMapLocation(SetMapLocationParams params)Set map view to current location. booleancalculateRoute(CalculateRouteParams params)booleanrefreshMap()Refresh the map (UI) booleanaddFavoriteGroup(AddFavoriteGroupParams params)Add favorite group with given params. booleanremoveFavoriteGroup(RemoveFavoriteGroupParams params)Remove favorite group with given name. booleanupdateFavoriteGroup(UpdateFavoriteGroupParams params)Update favorite group with given params. booleanaddFavorite(AddFavoriteParams params)Add favorite at given location with given params. booleanremoveFavorite(RemoveFavoriteParams params)Remove favorite at given location with given params. booleanupdateFavorite(UpdateFavoriteParams params)Update favorite at given location with given params. booleanstartGpxRecording(StartGpxRecordingParams params)Start gpx recording. booleanstopGpxRecording(StopGpxRecordingParams params)Stop gpx recording. booleantakePhotoNote(TakePhotoNoteParams params)Take photo note. booleanstartVideoRecording(StartVideoRecordingParams params)Start video note recording. booleanstartAudioRecording(StartAudioRecordingParams params)Start audio note recording. booleanstopRecording(StopRecordingParams params)Stop Audio/Video recording. booleannavigate(NavigateParams params)Start navigation. booleannavigateGpx(NavigateGpxParams params)Start navigation using gpx file. booleanremoveGpx(RemoveGpxParams params)Remove GPX file. booleanshowMapPoint(ShowMapPointParams params)Show AMapPoint on map in OsmAnd. booleansetNavDrawerItems(SetNavDrawerItemsParams params)Method for adding up to 3 items to the OsmAnd navigation drawer. booleanpauseNavigation(PauseNavigationParams params)Put navigation on pause. booleanresumeNavigation(ResumeNavigationParams params)Resume navigation if it was paused before. booleanstopNavigation(StopNavigationParams params)Stop navigation. booleanmuteNavigation(MuteNavigationParams params)Mute voice guidance. booleanunmuteNavigation(UnmuteNavigationParams params)Unmute voice guidance. booleansearch(SearchParams params, IOsmAndAidlCallback callback)Run search for POI / Address. booleannavigateSearch(NavigateSearchParams params)Do search and start navigation. longregisterForUpdates(long updateTimeMS, IOsmAndAidlCallback callback)Method to register for periodical callbacks from OsmAnd booleanunregisterFromUpdates(long callbackId)Method to unregister from periodical callbacks from OsmAnd booleansetNavDrawerLogo(String imageUri)Method for adding image to the top of Osmand's NavDrawer. booleansetEnabledIds(List<String> ids)Method for selected UI elements (like QuickSearch button) to show. booleansetDisabledIds(List<String> ids)Method for selected UI elements (like QuickSearch button) to hide. booleansetEnabledPatterns(List<String> patterns)Method to show selected NavDrawer's menu items. booleansetDisabledPatterns(List<String> patterns)Method to hide selected NavDrawer's menu items. booleanregWidgetVisibility(SetWidgetsParams params)Register OsmAnd widgets for visibility. booleanregWidgetAvailability(SetWidgetsParams params)Register OsmAnd widgets for availability. booleancustomizeOsmandSettings(OsmandSettingsParams params)Add custom parameters for OsmAnd settings to associate with client app. booleangetImportedGpx(List<AGpxFile> files)Method to get list of gpx files currently registered (imported or created) in OsmAnd; booleangetSqliteDbFiles(List<ASqliteDbFile> files)Method to get list of sqlitedb files registered in OsmAnd; booleangetActiveSqliteDbFiles(List<ASqliteDbFile> files)Method to get list of currently active sqlitedb files booleanshowSqliteDbFile(String fileName)Method to show selected sqlitedb file as map overlay. booleanhideSqliteDbFile(String fileName)Method to hide sqlitedb file from map overlay. booleansetNavDrawerLogoWithParams(NavDrawerHeaderParams params)Method for adding image to the top of OsmAnd's NavDrawer with additional params booleansetNavDrawerFooterWithParams(NavDrawerFooterParams params)Method for adding functionality to "Powered by Osmand" logo in NavDrawer's footer(reset OsmAnd settings to pre-clinet app's state) booleanrestoreOsmand()Restore default (pre-client) OsmAnd settings and state:clears features, widgets and settings customization, NavDraw logo. booleanchangePluginState(PluginParams params)Method to change state of plug-ins in OsmAnd. booleanregisterForOsmandInitListener(IOsmAndAidlCallback callback)Method to register for callback on OsmAnd initialization booleangetBitmapForGpx(CreateGpxBitmapParams file, IOsmAndAidlCallback callback)Requests bitmap snap-shot of map with GPX file from provided URI in its center.You can set bitmap size, density and GPX lines color, but you needto manually download appropriate map in OsmAnd or background will be empty. intcopyFile(CopyFileParams filePart)Method to copy files to OsmAnd part by part. longregisterForNavigationUpdates(ANavigationUpdateParams params, IOsmAndAidlCallback callback)Method to register for updates during navgation. longaddContextMenuButtons(ContextMenuButtonsParams params, IOsmAndAidlCallback callback)Method to add Context Menu buttons to OsmAnd Context menu. booleanremoveContextMenuButtons(RemoveContextMenuButtonsParams params)Method to remove Context Menu buttons from OsmAnd Context menu. booleanupdateContextMenuButtons(UpdateContextMenuButtonsParams params)Method to update params on already set custom Context Button. booleanareOsmandSettingsCustomized(OsmandSettingsInfoParams params)Method to check if there is a customized setting in OsmAnd Settings. booleansetCustomization(CustomizationInfoParams params)Method to customize parameters of OsmAnd. longregisterForVoiceRouterMessages(ANavigationVoiceRouterMessageParams params, IOsmAndAidlCallback callback)Method to register for Voice Router voice messages during navigation. booleanremoveAllActiveMapMarkers(RemoveMapMarkersParams params)Removes all active map markers (marks them as passed and moves to history)Empty class of params booleanimportProfile(ProfileSettingsParams params)booleanexecuteQuickAction(QuickActionParams params)booleangetQuickActionsInfo(List<QuickActionInfoParams> quickActions)booleansetLockState(SetLockStateParams params)Toggle Lock/Unlock screen. longregisterForKeyEvents(AKeyEventsParams params, IOsmAndAidlCallback callback)Method to register for key events. AppInfoParamsgetAppInfo()booleansetMapMargins(MapMarginsParams params)booleanexportProfile(ExportProfileParams params)booleanisFragmentOpen()Is any fragment open. booleanisMenuOpen()Is contect menu open. intgetPluginVersion(CustomPluginParams params)booleanselectProfile(SelectProfileParams params)booleangetProfiles(List<AProfile> profiles)booleangetBlockedRoads(List<ABlockedRoad> blockedRoads)booleanaddRoadBlock(AddBlockedRoadParams params)booleanremoveRoadBlock(RemoveBlockedRoadParams params)booleansetLocation(SetLocationParams params)booleanexitApp(ExitAppParams params)booleangetText(GetTextParams params)booleanreloadIndexes()booleansetPreference(PreferenceParams params)booleangetPreference(PreferenceParams params)longregisterForLogcatMessages(ALogcatListenerParams params, IOsmAndAidlCallback callback)Method to register for Logcat messages. booleansetZoomLimits(ZoomLimitsParams params)booleanaddWidgetGroup(AddWidgetGroupParams params)Register or update a widget group. booleanremoveWidgetGroup(RemoveWidgetGroupParams params)Remove a widget group. IBinderasBinder()-
-
Method Detail
-
addMapMarker
boolean addMapMarker(AddMapMarkerParams params)
Add map marker at given location.
-
removeMapMarker
boolean removeMapMarker(RemoveMapMarkerParams params)
Remove map marker.If ignoreCoordinates is false the marker is only removed if lat/lon match the currently set values of the marker.If ignoreCoordinates is true the marker is removed if the name matches, the values of lat/lon are ignored.
-
updateMapMarker
boolean updateMapMarker(UpdateMapMarkerParams params)
Update map marker.If ignoreCoordinates is false the marker gets updated only if latPrev/lonPrev match the currently set values of the marker.If ignoreCoordinates is true the marker gets updated if the name matches, the values of latPrev/lonPrev are ignored.
-
addMapWidget
boolean addMapWidget(AddMapWidgetParams params)
Add map widget to the right side of the main screen.Note: any specified icon should exist in OsmAnd app resources.
-
removeMapWidget
boolean removeMapWidget(RemoveMapWidgetParams params)
Remove map widget.
-
updateMapWidget
boolean updateMapWidget(UpdateMapWidgetParams params)
Update map widget.Note: any specified icon should exist in OsmAnd app resources.
-
addMapPoint
boolean addMapPoint(AddMapPointParams params)
Add point to user layer.
- Parameters:
params- (Map) - optional map of params for point.
-
removeMapPoint
boolean removeMapPoint(RemoveMapPointParams params)
Remove point.
-
updateMapPoint
boolean updateMapPoint(UpdateMapPointParams params)
Update point.
- Parameters:
params- (Map) - optional map of params for point.
-
addMapLayer
boolean addMapLayer(AddMapLayerParams params)
Add user layer on the map.
-
removeMapLayer
boolean removeMapLayer(RemoveMapLayerParams params)
Remove user layer.
-
updateMapLayer
boolean updateMapLayer(UpdateMapLayerParams params)
Update user layer.
-
importGpx
boolean importGpx(ImportGpxParams params)
Import GPX file to OsmAnd (from URI or file).
-
showGpx
boolean showGpx(ShowGpxParams params)
Show GPX file on map.
-
hideGpx
boolean hideGpx(HideGpxParams params)
Hide GPX file.
-
getActiveGpx
boolean getActiveGpx(List<ASelectedGpxFile> files)
Get list of active GPX files.
-
setMapLocation
boolean setMapLocation(SetMapLocationParams params)
Set map view to current location.
-
calculateRoute
boolean calculateRoute(CalculateRouteParams params)
-
refreshMap
boolean refreshMap()
Refresh the map (UI)
-
addFavoriteGroup
boolean addFavoriteGroup(AddFavoriteGroupParams params)
Add favorite group with given params.
-
removeFavoriteGroup
boolean removeFavoriteGroup(RemoveFavoriteGroupParams params)
Remove favorite group with given name.
-
updateFavoriteGroup
boolean updateFavoriteGroup(UpdateFavoriteGroupParams params)
Update favorite group with given params.
-
addFavorite
boolean addFavorite(AddFavoriteParams params)
Add favorite at given location with given params.
-
removeFavorite
boolean removeFavorite(RemoveFavoriteParams params)
Remove favorite at given location with given params.
-
updateFavorite
boolean updateFavorite(UpdateFavoriteParams params)
Update favorite at given location with given params.
-
startGpxRecording
boolean startGpxRecording(StartGpxRecordingParams params)
Start gpx recording.
-
stopGpxRecording
boolean stopGpxRecording(StopGpxRecordingParams params)
Stop gpx recording.
-
takePhotoNote
boolean takePhotoNote(TakePhotoNoteParams params)
Take photo note.
-
startVideoRecording
boolean startVideoRecording(StartVideoRecordingParams params)
Start video note recording.
-
startAudioRecording
boolean startAudioRecording(StartAudioRecordingParams params)
Start audio note recording.
-
stopRecording
boolean stopRecording(StopRecordingParams params)
Stop Audio/Video recording.
-
navigate
boolean navigate(NavigateParams params)
Start navigation.
-
navigateGpx
boolean navigateGpx(NavigateGpxParams params)
Start navigation using gpx file. User need to grant Uri permission to OsmAnd.
-
removeGpx
boolean removeGpx(RemoveGpxParams params)
Remove GPX file.
-
showMapPoint
boolean showMapPoint(ShowMapPointParams params)
Show AMapPoint on map in OsmAnd.
- Parameters:
params- Map- optional map of params for point.
-
setNavDrawerItems
boolean setNavDrawerItems(SetNavDrawerItemsParams params)
Method for adding up to 3 items to the OsmAnd navigation drawer.
-
pauseNavigation
boolean pauseNavigation(PauseNavigationParams params)
Put navigation on pause.
-
resumeNavigation
boolean resumeNavigation(ResumeNavigationParams params)
Resume navigation if it was paused before.
-
stopNavigation
boolean stopNavigation(StopNavigationParams params)
Stop navigation. Removes target / intermediate points and route path from the map.
-
muteNavigation
boolean muteNavigation(MuteNavigationParams params)
Mute voice guidance. Stays muted until unmute manually or via the api.
-
unmuteNavigation
boolean unmuteNavigation(UnmuteNavigationParams params)
Unmute voice guidance.
-
search
boolean search(SearchParams params, IOsmAndAidlCallback callback)
Run search for POI / Address.
-
navigateSearch
boolean navigateSearch(NavigateSearchParams params)
Do search and start navigation.
-
registerForUpdates
long registerForUpdates(long updateTimeMS, IOsmAndAidlCallback callback)
Method to register for periodical callbacks from OsmAnd
- Parameters:
updateTimeMS- (long)- period of time in millisecond after which callback is triggeredcallback- (IOsmAndCallback)- create and provide instance of IOsmAndAidlCallback interface
-
unregisterFromUpdates
boolean unregisterFromUpdates(long callbackId)
Method to unregister from periodical callbacks from OsmAnd
- Parameters:
callbackId- (long)- id of registered callback (provided by OsmAndin registerForUpdates)
-
setNavDrawerLogo
boolean setNavDrawerLogo(String imageUri)
Method for adding image to the top of Osmand's NavDrawer.
- Parameters:
imageUri- (String)- image's URI.
-
setEnabledIds
boolean setEnabledIds(List<String> ids)
Method for selected UI elements (like QuickSearch button) to show.
- Parameters:
ids- (List)- list of menu items keys from
-
setDisabledIds
boolean setDisabledIds(List<String> ids)
Method for selected UI elements (like QuickSearch button) to hide.
- Parameters:
ids- (List)- list of menu items keys from
-
setEnabledPatterns
boolean setEnabledPatterns(List<String> patterns)
Method to show selected NavDrawer's menu items.
- Parameters:
patterns- (List) - list of menu items names from
-
setDisabledPatterns
boolean setDisabledPatterns(List<String> patterns)
Method to hide selected NavDrawer's menu items.
- Parameters:
patterns- (List)- list of menu items names from
-
regWidgetVisibility
boolean regWidgetVisibility(SetWidgetsParams params)
Register OsmAnd widgets for visibility.
-
regWidgetAvailability
boolean regWidgetAvailability(SetWidgetsParams params)
Register OsmAnd widgets for availability.
-
customizeOsmandSettings
boolean customizeOsmandSettings(OsmandSettingsParams params)
Add custom parameters for OsmAnd settings to associate with client app.
-
getImportedGpx
boolean getImportedGpx(List<AGpxFile> files)
Method to get list of gpx files currently registered (imported or created) in OsmAnd;
-
getSqliteDbFiles
boolean getSqliteDbFiles(List<ASqliteDbFile> files)
Method to get list of sqlitedb files registered in OsmAnd;
-
getActiveSqliteDbFiles
boolean getActiveSqliteDbFiles(List<ASqliteDbFile> files)
Method to get list of currently active sqlitedb files
-
showSqliteDbFile
boolean showSqliteDbFile(String fileName)
Method to show selected sqlitedb file as map overlay.
- Parameters:
fileName- (String) - name of sqlitedb file
-
hideSqliteDbFile
boolean hideSqliteDbFile(String fileName)
Method to hide sqlitedb file from map overlay.
- Parameters:
fileName- (String) - name of sqlitedb file
-
setNavDrawerLogoWithParams
boolean setNavDrawerLogoWithParams(NavDrawerHeaderParams params)
Method for adding image to the top of OsmAnd's NavDrawer with additional params
-
setNavDrawerFooterWithParams
boolean setNavDrawerFooterWithParams(NavDrawerFooterParams params)
Method for adding functionality to "Powered by Osmand" logo in NavDrawer's footer(reset OsmAnd settings to pre-clinet app's state)
-
restoreOsmand
boolean restoreOsmand()
Restore default (pre-client) OsmAnd settings and state:clears features, widgets and settings customization, NavDraw logo.
-
changePluginState
boolean changePluginState(PluginParams params)
Method to change state of plug-ins in OsmAnd.
-
registerForOsmandInitListener
boolean registerForOsmandInitListener(IOsmAndAidlCallback callback)
Method to register for callback on OsmAnd initialization
- Parameters:
callback- (IOsmAndAidlCallback) - create and provide instance of IOsmAndAidlCallback interface
-
getBitmapForGpx
boolean getBitmapForGpx(CreateGpxBitmapParams file, IOsmAndAidlCallback callback)
Requests bitmap snap-shot of map with GPX file from provided URI in its center.You can set bitmap size, density and GPX lines color, but you needto manually download appropriate map in OsmAnd or background will be empty.Bitmap will be returned through callback onGpxBitmapCreated
- Parameters:
callback- (IOsmAndAidlCallback) - instance of callback from OsmAnd.
-
copyFile
int copyFile(CopyFileParams filePart)
Method to copy files to OsmAnd part by part. For now supports only sqlitedb format.Part size (bytearray) should not exceed 256k.
-
registerForNavigationUpdates
long registerForNavigationUpdates(ANavigationUpdateParams params, IOsmAndAidlCallback callback)
Method to register for updates during navgation. Notifies user about distance to the next turn and its type.
- Parameters:
callback- (IOsmAndAidlCallback) - callback to notify user on navigation data change
-
addContextMenuButtons
long addContextMenuButtons(ContextMenuButtonsParams params, IOsmAndAidlCallback callback)
Method to add Context Menu buttons to OsmAnd Context menu. ContextMenuButtonsParams is a wrapper class for params:
- Parameters:
callback- (IOsmAndAidlCallback) - AIDL callback;
-
removeContextMenuButtons
boolean removeContextMenuButtons(RemoveContextMenuButtonsParams params)
Method to remove Context Menu buttons from OsmAnd Context menu. RemoveContextMenuButtonsParams is a wrapper class for params:
-
updateContextMenuButtons
boolean updateContextMenuButtons(UpdateContextMenuButtonsParams params)
Method to update params on already set custom Context Button. UpdateContextMenuButtonsParams is a wrapper class for params:
-
areOsmandSettingsCustomized
boolean areOsmandSettingsCustomized(OsmandSettingsInfoParams params)
Method to check if there is a customized setting in OsmAnd Settings. OsmandSettingsInfoParams is a wrapper class for params:
-
setCustomization
boolean setCustomization(CustomizationInfoParams params)
Method to customize parameters of OsmAnd.
- Parameters:
params- (CustomizationInfoParams) - wrapper class for custom settings and ui.
-
registerForVoiceRouterMessages
long registerForVoiceRouterMessages(ANavigationVoiceRouterMessageParams params, IOsmAndAidlCallback callback)
Method to register for Voice Router voice messages during navigation. Notifies user about voice messages.
-
removeAllActiveMapMarkers
boolean removeAllActiveMapMarkers(RemoveMapMarkersParams params)
Removes all active map markers (marks them as passed and moves to history)Empty class of params
-
importProfile
boolean importProfile(ProfileSettingsParams params)
-
executeQuickAction
boolean executeQuickAction(QuickActionParams params)
-
getQuickActionsInfo
boolean getQuickActionsInfo(List<QuickActionInfoParams> quickActions)
-
setLockState
boolean setLockState(SetLockStateParams params)
Toggle Lock/Unlock screen.
-
registerForKeyEvents
long registerForKeyEvents(AKeyEventsParams params, IOsmAndAidlCallback callback)
Method to register for key events.
-
getAppInfo
AppInfoParams getAppInfo()
-
setMapMargins
boolean setMapMargins(MapMarginsParams params)
-
exportProfile
boolean exportProfile(ExportProfileParams params)
-
isFragmentOpen
boolean isFragmentOpen()
Is any fragment open.
-
isMenuOpen
boolean isMenuOpen()
Is contect menu open.
-
getPluginVersion
int getPluginVersion(CustomPluginParams params)
-
selectProfile
boolean selectProfile(SelectProfileParams params)
-
getProfiles
boolean getProfiles(List<AProfile> profiles)
-
getBlockedRoads
boolean getBlockedRoads(List<ABlockedRoad> blockedRoads)
-
addRoadBlock
boolean addRoadBlock(AddBlockedRoadParams params)
-
removeRoadBlock
boolean removeRoadBlock(RemoveBlockedRoadParams params)
-
setLocation
boolean setLocation(SetLocationParams params)
-
exitApp
boolean exitApp(ExitAppParams params)
-
getText
boolean getText(GetTextParams params)
-
reloadIndexes
boolean reloadIndexes()
-
setPreference
boolean setPreference(PreferenceParams params)
-
getPreference
boolean getPreference(PreferenceParams params)
-
registerForLogcatMessages
long registerForLogcatMessages(ALogcatListenerParams params, IOsmAndAidlCallback callback)
Method to register for Logcat messages. Notifies user about new logs in application.
- Parameters:
callback- (IOsmAndAidlCallback) - callback to notify user on new OsmAnd logs
-
setZoomLimits
boolean setZoomLimits(ZoomLimitsParams params)
-
addWidgetGroup
boolean addWidgetGroup(AddWidgetGroupParams params)
Register or update a widget group. Widgets assigned to this group viaAMapWidget.setGroupId(id) are shown together in the "Configure screen".Calling it again with the same id updates the group's name/description/icons.Groups are transient and must be re-registered on each connection.
-
removeWidgetGroup
boolean removeWidgetGroup(RemoveWidgetGroupParams params)
Remove a widget group. By default its widgets are kept but become ungrouped;set RemoveWidgetGroupParams.removeWidgets = true to also remove the widgets.
-
-
-
-