Skip to content
Pavel Tychinin edited this page Mar 27, 2024 · 22 revisions

Introduction

This page contains the formal description of Navigine-SDK 2.0 API: a list of classes and their public fields and methods which provide the following functionality:

  • automatically downloading location maps from the server;
  • indoor device navigation;
  • building routes between the two or more points within the location;
  • showing advertising notifications.

Navigine SDK classes with some description

The following API can be used for building your own Android apps using our Navigation library.

Navigine Sdk

Class NavigineSdk is the main class of Navigation library. It contains a list of static functions for initializing library, and list of functions for getting access to the managers, each of which will provide different opportunities for working with SDK.

Managers

Class LocationListManager is used for working with the list of locations. It provides public function for adding and removing LocationListListener callback.

Class LocationManager is used for working with Location. It loads location, keeps it up to date with the server version, and provides public functions for adding LocationListener callback and for setting current location id.

Class NavigationManager is used for working with position. It provides public functions for starting and stopping log recording, and for adding PositionListener callback which will notify about new position.

Class RouteManager is used for working with routes and user position. It depends from NavigationManager and provides public functions for making route, setting target position, adding RouteListener callback which will provide updated paths up to your target point, etc.

Class ZoneManager is used for working with the zones. It provides public function for adding ZoneListener callback which will notify about entering or leaving zones.

Class NotificationManager is used for working with the notifications. It provides public function for adding NotificationListener callback which will notify after seeing the beacon with some notification.

Class MeasurementManager is used for working with the sensors and signals. It contains public functions for adding MeasurementListener which will provide the current signals and sensors data.

Class LocationEditManager is used for editing Location elements and uploading changes to the server. It provides public functions for editing most of the transmitters, uploading changes, and adding LocationEditListener callback which will notify about location changes and uploading statuses.

Class ResourceManager provides public functions for working with the images, user events and files, working with recorded logs.

Location elements

Class Location contains location parameters: identifier, name, version, a list of sublocations, etc.

Class Sublocation contains sublocation parameters: identifier, name, width, height, list of transmitters of all types, etc.

Class Category contains category parameters: identifier, name and image id.

Class Venue contains venue parameters: identifier, name, major, phone, description, point, etc.

Class Zone contains zone parameters: identifier, name, uuid, guid, alias, point, etc.

Transmitters

  • Class Beacon contains beacon parameters: name, major, minor, uuid, power, point, etc.

  • Class Eddystone contains eddystone parameters: name, namespace id, instance id, power, point, etc.

  • Class Wifi contains wifi parameters: name, uuid, point, etc.

Location View classes

Class LocationView is used for displaying the location and elements on it, for making routes, adding map elements and working with gestures.

Class CircleMapObject is used for displaying the circle objects on map with different styles.

Class PolyLineMapObject is used for displaying the poly-line objects on map with different styles.

Class IconMapObject is used for displaying the image objects on map with different styles.

Class TouchInput is used for interacting with gestures and touches.

Gesture and touch interfaces

PanResponder interface is used for notifying about scrolling on screen and fling.

ScaleResponder interface is used for notifying about zooming in and out.

LongPressResponder interface is used for notifying about long press.

DoubleTapResponder interface is used for notifying about double press.

TapResponder interface is used for notifying about tap on the screen.

Listeners

LocationListListener is used for notifying user about new LocationInfo list loaded from server.

LocationListener is used for notifying user after successfully setting the Location.

PositionListener is used for notifying user after the Position will be changed.

RouteListener is used for notifying user after the new RoutePaths will be calculated for the current target point.

ZoneListener is used for notifying user after the Zone will be entered or leaved.

NotificationListener is used for notifying user after the Notification will be handled from some beacon.

LocationEditListener is used for notifying user after the Location will be changed or its changes will be uploaded.

MeasurementListener is used for notifying user after the new scanned sensors and signals will be arrived.

ResourceListener is used for notifying when the image is loaded or failed.

ResourceUploadListener is used for notifying when the file is loaded to the server or failed.

Secondary classes

Class Notification contains notification parameters: identifier, title, content and image id.

Class Position contains position parameters: identifier, point, time, list of RoutePaths, etc.

Class SignalMeasurement contains signal parameters: identifier, type, rssi and distance.

Class SensorMeasurement contains sensor parameters: type and its values.

Class Image contains image parameters and could be used for getting Bitmap: data, width, height.

Class RoutePath contains route path parameters: length, list of RouteEvents, list of LocationPoints.

Class RouteEvent contains route event parameters: distance, value, route event type.

Class LocationPoint contains location point parameters: location id, sublocation id, point.

Class LocationInfo contains location info parameters: identifier, name, version.

Class BitmapRegionDecoder is used for getting android.graphics.Bitmap from bytes array.

System requirements

Navigation library works on the following Android devices:

  • Android SDK API >= 21 (Android 5.0 or later);
  • Support for Bluetooth 4.0 on the device;
  • CPU architecture is on of the following: arm, arm64, x86, x86_64.

Required permissions

For Navigation library to work in your application, you should add the following permissions to your AndroidManifest.xml:

  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
  <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
  <uses-permission android:name="android.permission.BLUETOOTH"/>
  <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
  <uses-permission android:name="android.permission.INTERNET"/>
  <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

Useful links and tutorials

Getting Started page provides a short guide for starting using Navigation library in your own applications.

Clone this wiki locally