Перейти к основному содержимому

interface

AudioDriver​

Интерфейс для реализации аудио драйвера на платформе.

Preventing memory leaks: the native layer holds a strong reference to the passed implementation object. If the implementation is an inner/anonymous class or a lambda, it implicitly captures the parent's this (e.g. Activity), causing a memory leak. Implement this interface in a standalone class without capturing this, passing required dependencies via the constructor wrapped in WeakReference.

Methods
fun setReader(reader: AudioStreamReader): Unit

Устанавливает функцию обратного вызова, которую вызывает аудиодрайвер для загрузки данных.

Повторный вызов данного метода перезаписывает сохраненную ранее функцию обратного вызова.

Parameters

reader

Returns
Unit
fun setAvailableCallback(callback: AvailableCallback): Unit

Устанавливает функцию обратного вызова на сигнал о смене доступности аудиоустройства приложению.

Повторный вызов данного метода перезаписывает сохраненную ранее функцию обратного вызова.

Parameters

callback

Returns
Unit
fun available(): Boolean

Доступно ли на текущий момент аудиоустройство приложению.

Returns
Boolean
fun play(): Unit

Запускает воспроизведение звукового потока.

После вызова этого метода должна начать вызываться функция обратного вызова, если она установлена в методе set_reader.

Если функция обратного вызова вернет 0 записанных байт, воспроизведение звукового потока можно остановить.

Returns
Unit

BufferedChannel​

Properties

val value​

T?

CameraMoveController​

Класс, позволяющий управлять положением камеры для нужд анимации

Класс должен быть потокобезопасным.

Preventing memory leaks: the native layer holds a strong reference to the passed implementation object. If the implementation is an inner/anonymous class or a lambda, it implicitly captures the parent's this (e.g. Activity), causing a memory leak. Implement this interface in a standalone class without capturing this, passing required dependencies via the constructor wrapped in WeakReference.

Methods
fun position(time: Duration): CameraPosition

Позиция области просмотра в конкретный момент времени. Контроллер должен быть готов к тому, что время анимации будет передаваться в любом порядке, не обязательно в неубывающем.

Parameters

time

Время от начала анимации в миллисекундах.

Returns
CameraPosition

Положение области просмотра в указанный момент времени.

fun animationTime(): Duration

Продолжительность анимации в миллисекундах.

Returns
Duration

Продолжительность анимации в миллисекундах.

Channel​

Methods
@CheckResult
fun connect(executor: Executor, callback: ChannelCallback<T>): AutoCloseable
Parameters

executor

Executor

callback

Returns
AutoCloseable
@CheckResult
fun connect(callback: ChannelCallback<T>): AutoCloseable
Parameters

callback

Returns
AutoCloseable

CustomFollowController​

Интерфейс, который можно реализовать на платформе для создания собственного контроллера слежения за параметрами Для добавления контроллера в камеру, нужно реализовать этот интерфейс и создать объект FollowController'а передав в качестве аргумента объект, реализующий данные интерфейс.

Preventing memory leaks: the native layer holds a strong reference to the passed implementation object. If the implementation is an inner/anonymous class or a lambda, it implicitly captures the parent's this (e.g. Activity), causing a memory leak. Implement this interface in a standalone class without capturing this, passing required dependencies via the constructor wrapped in WeakReference.

Methods
fun availableValues(): EnumSet<FollowValue>

Набор видов значений, которыми умеет управлять данный контроллер.

Returns
EnumSet<FollowValue>
fun requestValues(values: EnumSet<FollowValue>): Unit

С помощью этого метода в контроллер сообщается, какие из предоставляемых им значений используются. Это позволяет освободить ресурсы, связанные с вычислением неиспользуемых значений. Метод может вызываться многократно с разными значениями, в этом случае актуальным является последнее из них.

Parameters

values

EnumSet<FollowValue>
Returns
Unit
fun setNewValuesNotifier(notifier: NewValuesNotifier?): Unit

Установка нотифаера, который оповещает о новых значениях. Нотифаер нужно сохранить в реализуемом контроллере

Parameters

notifier

Returns
Unit
fun coordinates(): GeoPoint?

Географические координаты. Метод вызывается только после вызова request_values с соответствующими параметрами.

Returns
fun bearing(): Bearing?

Направление. Метод вызывается только после вызова request_values с соответствующими параметрами.

Returns
fun tilt(): Tilt?

Наклон карты. Метод вызывается только после вызова request_values с соответствующими параметрами.

Returns
fun styleZoom(): StyleZoom?

Стилевой уровень масштабирования карты. Метод вызывается только после вызова request_values с соответствующими параметрами.

Returns

Future​

Methods
fun onComplete(
executor: Executor,
resultCallback: FutureResultCallback<T>,
errorCallback: FutureErrorCallback
): Unit
Parameters

executor

Executor

resultCallback

errorCallback

Returns
Unit
fun onComplete(resultCallback: FutureResultCallback<T>, errorCallback: FutureErrorCallback): Unit
Parameters

resultCallback

errorCallback

Returns
Unit
fun onResult(executor: Executor, callback: FutureResultCallback<T>): Unit
Parameters

executor

Executor

callback

Returns
Unit
fun onResult(callback: FutureResultCallback<T>): Unit
Parameters

callback

Returns
Unit
fun onError(executor: Executor, callback: FutureErrorCallback): Unit
Parameters

executor

Executor

callback

Returns
Unit
fun onError(callback: FutureErrorCallback): Unit
Parameters

callback

Returns
Unit
fun map(transform: Function1): Future<R>

Returns a future with transform applied to the result. An error — including one thrown by transform — is delivered to the error callback. Closing the returned future closes the original one.

Parameters

transform

(T) -> R
Returns
suspend fun await(): T
Returns
T

HttpClient​

Интерфейс для реализации сетевого клиента на платформе.

Preventing memory leaks: the native layer holds a strong reference to the passed implementation object. If the implementation is an inner/anonymous class or a lambda, it implicitly captures the parent's this (e.g. Activity), causing a memory leak. Implement this interface in a standalone class without capturing this, passing required dependencies via the constructor wrapped in WeakReference.

Methods
fun sendRequest(request: HttpRequest, callback: HttpResponseCallback): Unit

Метод для обработки запроса из SDK.

Parameters

request

запрос для отправки.

callback

объект с обратными вызовами для отправки и получения данных.

Returns
Unit

InstallFallback​

Поведение при ошибке установки или обновления пакета.

Preventing memory leaks: the native layer holds a strong reference to the passed implementation object. If the implementation is an inner/anonymous class or a lambda, it implicitly captures the parent's this (e.g. Activity), causing a memory leak. Implement this interface in a standalone class without capturing this, passing required dependencies via the constructor wrapped in WeakReference.

Methods
fun process(targetPackage: Package): Unit
Parameters

targetPackage

пакет, при установке которого произошла ошибка.

Returns
Unit

LocationChangeListener​

Интерфейс для сообщения об изменении геопозиции и её доступности.

Methods
fun onLocationChanged(locations: Array<Location>): Unit
Parameters

locations

Array<Location>
Returns
Unit
fun onAvailabilityChanged(availability: Boolean): Unit
Parameters

availability

Boolean
Returns
Unit

LocationService​

Интерфейс, предоставляющий последнюю известную геопозицию.

Properties

val lastLocation​

Location?

Наилучшая известная на текущий момент геопозиция. Если известная на текущий момент геопозиция отсутствует, возвращается null. Возвращаемая геопозиция может быть недостоверной, например являться устаревшей и/или не соответствовать требуемой точности.

LocationSource​

Methods
fun activate(listener: LocationChangeListener): Unit
Parameters

listener

Returns
Unit
fun deactivate(): Unit
Returns
Unit
fun setDesiredAccuracy(accuracy: DesiredAccuracy): Unit
Parameters

accuracy

Returns
Unit

LogSink​

Приемник логирования.

Preventing memory leaks: the native layer holds a strong reference to the passed implementation object. If the implementation is an inner/anonymous class or a lambda, it implicitly captures the parent's this (e.g. Activity), causing a memory leak. Implement this interface in a standalone class without capturing this, passing required dependencies via the constructor wrapped in WeakReference.

Methods
fun write(message: LogMessage): Unit

Запись в лог. Метод может вызываться на произвольном потоке.

Parameters

message

Returns
Unit

MagneticHeadingSource​

Methods
fun activate(listener: MagneticChangeListener): Unit
Parameters

listener

Returns
Unit
fun deactivate(): Unit
Returns
Unit

MapControllerFactory​

Methods
fun create(context: Context, options: MapControllerOptions): Future<MapController>
Parameters

MapControllerState​

State of the map provided by a MapControllerViewModel.

MapControllerViewModel​

Owns a MapController and exposes it to a map view.

Attach it to a view with MapView.setMapControllerViewModel or MapComposable. The view only observes state and never closes the controller: its lifecycle is managed by the view model implementation.

Main thread only.

Methods
suspend fun awaitController(): MapController

Suspends until the map is created and returns its controller.

suspend fun awaitMap(): Map

Same as awaitController, but returns Map of the controller.

Returns
Properties

val state​

<ERROR CLASS><MapControllerState>

Current state of the map.

MapEventSender​

Интерфейс, позволяющий отправить событие ввода в карту.

Methods
fun sendEvent(event: Event): Unit
Parameters

event

Returns
Unit

MapGestureRecognitionEngine​

Интерфейс для распознавания жестов.

Methods
fun processMotionEvent(event: MotionEvent): Boolean
Parameters

event

MotionEvent
Returns
Boolean
fun resetRecognitionState(): Unit
Returns
Unit
fun onDevicePpiChanged(devicePpi: DevicePpi): Unit
Parameters

devicePpi

Returns
Unit
fun setMapEventSender(mapEventSender: MapEventSender): Unit
Parameters

mapEventSender

Returns
Unit

MutableChannel​

Methods
fun send(value: T): Unit
Parameters

value

T
Returns
Unit

MutableStatefulChannel​

Properties

var value​

T

RadarApiHttpClient​

Интерфейс HTTP-клиента для Radar API.

Methods
fun post(
url: String,
body: String,
headers: Map
): RadarHttpResponse

Выполняет POST-запрос к указанному URL

Parameters

url

String

URL для запроса

body

String

Тело запроса в формате JSON

headers

Map
Returns
RadarHttpResponse

Ответ от сервера в виде RadarHttpResponse

RoadEventActionButtonModel​

Модель UI-элемента дорожного события.

Methods
fun onClicked(): Unit

Действие при нажатии.

Returns
Unit
Properties

val icon​

Icon?

Иконка.

val name​

String?

Название, например, "Подтвердить".

val countChannel​

Количество действий, применённых к событию всеми пользователями.

val highlightChannel​

Подсвеченность.

RoadEventFilter​

Фильтр отображаемых дорожных событий.

Preventing memory leaks: the native layer holds a strong reference to the passed implementation object. If the implementation is an inner/anonymous class or a lambda, it implicitly captures the parent's this (e.g. Activity), causing a memory leak. Implement this interface in a standalone class without capturing this, passing required dependencies via the constructor wrapped in WeakReference.

Methods
fun passes(event: RoadEventFilterData): Boolean
Parameters

event

Returns
Boolean

SafeLocationListener​

Methods
fun onProviderDisabled(provider: String): Unit
Parameters

provider

String
Returns
Unit
fun onProviderEnabled(provider: String): Unit
Parameters

provider

String
Returns
Unit
fun onStatusChanged(
provider: String,
status: Int,
extras: Bundle
): Unit
Parameters

provider

String

status

Int

extras

Bundle
Returns
Unit

SearchHistoryKeyStrategy​

Интерфейс, предоставляющий реализовать стратегию создания ключа для элемента истории поиска. Ключ используется для определения уникальности элемента истории поиска.

Preventing memory leaks: the native layer holds a strong reference to the passed implementation object. If the implementation is an inner/anonymous class or a lambda, it implicitly captures the parent's this (e.g. Activity), causing a memory leak. Implement this interface in a standalone class without capturing this, passing required dependencies via the constructor wrapped in WeakReference.

Methods
fun create(item: SearchHistoryItem): String

Возвращает ключ для элемента истории поиска.

Parameters

item

Returns
String

SearchViewCallback​

Интерфейс для установки функций обратного вызова для SearchLayout.

Methods
fun directoryObjectChosen(obj: DirectoryObject): Unit

Метод будет вызван при выборе пользователем результата из поисковой выдачи. Будет возвращен выбранный DirectoryObject.

Parameters

obj

Returns
Unit
fun searchCompletedSuccessfully(items: List<DirectoryObject>): Unit

Метод будет вызван при успешном завершении поиска. Будет возвращен список результатов DirectoryObject, полученный в результате поиска.

Parameters

items

List<DirectoryObject>
Returns
Unit
fun searchCompletedWithException(message: String): Unit

Метод будет вызван, если в процессе поиска возникнет исключение. Будет возвращено сообщение из исключения.

Parameters

message

String
Returns
Unit
fun searchAborted(): Unit

Метод будет вызван, если поисковая строка была очищена от ввода.

Returns
Unit
fun searchClosed(): Unit

Метод будет вызван, если пользователь закрыл поиск стандартным способом: кнопкой закрытия, рядом с поисковой строкой.

Returns
Unit

SearchViewConfigurator​

Интерфейс для настройки поиска в SearchLayout.

Methods
fun setSuggestorType(suggestorType: SuggestorType): Unit

Установить тип подсказчика. По умолчанию: SuggestorType.OBJECT

Parameters

suggestorType

Returns
Unit
fun setSortingType(sortingType: SortingType): Unit

Установить тип сортировки поисковой выдачи. По умолчанию: SortingType.BY_RELEVANCE

Parameters

sortingType

Returns
Unit
fun setAllowedSearchResultTypes(allowedSearchResultTypes: List<ObjectType>): Unit

Установить типы объектов ObjectType, разрешенные в результате поискового запроса. По умолчанию: все, кроме ObjectType.ROUTE.

Parameters

allowedSearchResultTypes

List<ObjectType>
Returns
Unit
fun setAllowedSuggestedTypes(allowedSuggestedTypes: List<SuggestedType>): Unit

Установить типы объектов SuggestedType, разрешенные в поисковых подсказках. По умолчанию: все, кроме SuggestedType.ROUTE.

Parameters

allowedSuggestedTypes

List<SuggestedType>
Returns
Unit
fun setPageSize(size: Int): Unit

Установить лимит на количество подсказок в suggest'e и результатов в выдаче Допустимы значения от 1 до 50. По умолчанию: 10.

Parameters

size

Int
Returns
Unit
fun setSpatialRestrictions(spatialRestriction: List?<GeoPoint>): Unit

Установить ограничение области поиска в форме полигона. Первая и последняя точки полигона не обязаны совпадать. По умолчанию: отсутствует.

Parameters

spatialRestriction

List?<GeoPoint>
Returns
Unit
fun setAreaOfInterest(rect: GeoRect?): Unit

Установить прямоугольную область интереса в географических координатах. По умолчанию: отсутствует.

Parameters

rect

Returns
Unit
fun setSearchType(type: SearchType): Unit

Установить тип SearchType поисковика. Возможные варианты и значение по умолчанию зависят от типа поставки SDK. Подробнее см. SearchType и SearchOptions

Parameters

type

Returns
Unit
fun setLocationProvider(provider: LocationService?): Unit

Установить провайдера геопозиции для определения расстояния до объекта в выдаче. По умолчанию не установлен.

Parameters

provider

Returns
Unit

SimpleClusterRenderer​

Класс для кастомизации внешнего вида кластера в IMapObjectManager.

Preventing memory leaks: the native layer holds a strong reference to the passed implementation object. If the implementation is an inner/anonymous class or a lambda, it implicitly captures the parent's this (e.g. Activity), causing a memory leak. Implement this interface in a standalone class without capturing this, passing required dependencies via the constructor wrapped in WeakReference.

Methods
fun renderCluster(cluster: SimpleClusterObject): SimpleClusterOptions

Получение маркера для кластера.

Parameters

cluster

Объект кластера.

Returns
SimpleClusterOptions

Объект маркера кластера.

SpeechRecognizer​

Methods
fun recognize(onResult: Function1, onError: Function1): Unit

Запускает распознавание речи и обрабатывает результаты через функции обратного вызова.

Parameters

onResult

(String) -> Unit

Функция обратного вызова, получающая распознанный текст в виде String. Вызывается при успешном распознавании речи.

onError

(Exception) -> Unit

Функция обратного вызова, получающая Exception при ошибке распознавания. Вызывается для обработки различных ошибок в процессе распознавания.

Returns
Unit

StatefulChannel​

Properties

val value​

T

StyleZoomToTiltRelation​

Объект для описания зависимости угла наклона камеры от стилевого уровня масштабирования.

Preventing memory leaks: the native layer holds a strong reference to the passed implementation object. If the implementation is an inner/anonymous class or a lambda, it implicitly captures the parent's this (e.g. Activity), causing a memory leak. Implement this interface in a standalone class without capturing this, passing required dependencies via the constructor wrapped in WeakReference.

Methods
fun styleZoomToTilt(styleZoom: StyleZoom): Tilt

Получение наклона камеры по стилевому уровню масштабирования.

Parameters

styleZoom

Стилевой уровень масштабирования.

Returns
Tilt

угол наклона камеры

Функция должна быть непрерывной и монотонной.

Функция должна быть потокобезопасной.

TouchEventsObserver​

Methods
fun onTap(point: ScreenPoint): Unit
Parameters

point

Returns
Unit
fun onLongTouch(point: ScreenPoint): Unit
Parameters

point

Returns
Unit
fun onDragBegin(data: DragBeginData): Unit
Parameters

data

Returns
Unit
fun onDragMove(point: ScreenPoint): Unit
Parameters

point

Returns
Unit
fun onDragEnd(): Unit
Returns
Unit