Android SDK Documentation

DOCUMENT VERSION: 3.4
ANDROID SDK VERSION: 9.0.82
ANDROID BUNDLE VERSION 9.0.82
DATE REVISED Nov 23 2017

Section 1: Application Setup.

Step 1. Add Spreo SDK To Your Project.

Copy spreo-sdk-lib.jar file to the <project>/<app>/libs/ folder on your project. If The libs folder doesn't exist create it.

Add the following code to the /build.gradle:

allprojects {
    repositories {
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }
}

Add the following code to the dependencies on the <project>/app/build.gradle:

compile(name:'spreo-sdk-lib', ext:'aar')

Step 2. Add Google Dependencies.

Add the following code to the dependencies on the <project>/app/build.gradle:

compile 'com.google.android.gms:play-services-maps:10.2.6'

compile 'com.google.android.gms:play-services-location:10.2.6'

Step 3. Set The Required SDK Level.

Add these lines in your AndroidManifest file :

<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="25" />

Step 4. Set The Required Permissions.

Add the following lines in your AndroidManifest file :

<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<uses-permission android:name="android.permission.BLUETOOTH" />

<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

Step 5. Handle Permissions.

Beginning in Android 6.0 permissions are not granted when users install the application. Some of the permissions are now considered as dangerous, so user must accept it at run-time. More information about the new permissions can be found on Google's https://developer.android.com/training/permissions/requesting.html.

A sample of handling the permissions request can be found on the attached sample Application.

Step 6. Set Your SPREO API key.

Add this line to the application element in your AndroidManifest file:

<meta-data android:name="Spreo_api_key" android:value="<PUT_YOUR_API_KEY_HERE>" />

Step 7. Set Your Google API Key.

Add these lines to the application element in your AndroidManifest file.

<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="<PUT_YOUR_API_KEY_HERE>" />

Section 2: Update And Load The Required Data

Important - you have to update the data before you can start working with the SDK.

Step 1. Implement ConfigsUpdaterListener interface.

public class MainActivity extends Activity implements ConfigsUpdaterListener {
public void onPreConfigsDownload() {}

This method will be called when the update starts.

public void onPostConfigsDownload(ResUpdateStatus status) {}

This method will be called when the update ends.

Step 2. Subscribe To Update Events And Start The Update.

public class MainActivity extends Activity implements ConfigsUpdaterListener, ConfigsLoadListener {

SpreoResourceConfigsUtils.subscribeToResourceUpdateService(this); SpreoResourceConfigsUtils.update(this);
.

.

.

Step 3. Subscribe To SDK Messages Events

SDKMsgsManager manages the messages on the system level.

public class MainActivity extends Activity implements SDKMsgsListener{
//  subscribe to sdk messages events SDKMsgsManager.getInstance().subscribe(this);

.

.

@Override

public void onGPSproviderStatusChanged(boolean isEnabled) {
// check here if the GPS provider is enabled or not

// you need to turn it on.

String msg = (isEnabled == true )? "GPS PROVIDER IS ENABLED":"GPS PROVIDER IS DISABLED";
Toast.makeText(this, msg, Toast.LENGTH_LONG).show();

}

.

.

.

//unsubscibe from messages manager

SDKMsgsManager.getInstance().unsubscibe(this);

Step 4. When The Download Ends You Can Start The Location Service.

public void onPostConfigsDownload(ResUpdateStatus status){

SpreoResourceConfigsUtils.unSubscribeFromResourceUpdateService(this);

SpreoLocationProvider.getInstance().startLocationService(ctx);

Note: for stopping the location service use the following method:

SpreoLocationProvider.getInstance().stopLocationService();
.

.

.

Section 3: Implement The SpreoDualMapView.

Step 1. Add A SpreoDualMapView To Your XML Layout.

<com.spreo.sdk.view.SpreoDualMapView android:id="@+id/SpreoMap" android:layout_width="wrap_content" android:layout_height="wrap_content" />

Step 2. Add a SpreoDualMapView Member In Your Activity.

SpreoDualMapView mapView;

Step 3: Initiate The SpreoDualMapView.

In your activity onCreate method add the following lines:

mapView = (SpreoDualMapView) findViewById(R.id.SpreoMap); mapView.onCreate(savedInstanceState);

Step 4: Add Methods Required For Google Map Functionality.

In your Activity override the onResume, onPause, onDestroy, onLowMemory, onSaveInstanceState methods and call the following SpreoDualMapView methods:

protected void onResume() {

mapView.onResume();

super.onResume();

}

protected void onDestroy() {

mapView.onDestroy();

super.onDestroy();

}

protected void onPause() {

mapView.onPause();

super.onPause();

}

public void onLowMemory() {

mapView.onLowMemory();

super.onLowMemory();

}

protected void onSaveInstanceState(Bundle outState) { mapView.onSaveInstanceState(outState); super.onSaveInstanceState(outState);

}

Section 4: Enable Your Application To Receive And React To SpreoDualMapView Events.

Step 1: Implement SpreoDualMapViewListener Interface.

void mapDidLoad();

This method will be called when the map load finishes. Important - you should wait for this call before you start interacting with the map view.

public void onPoiClick(IPoi poi) {}

This method will be called when the map detects a click on a POI.

public void onBubbleClick(IPoi poi)

This method will be called when the map detects a click on a POI bubble

public void onMyParkingMarkerClick()

This method will be called when the map detects a click on my parking marker

public void onMyParkingBubbleClick()

This method will be called when the map detects a click on my parking marker bubble

void onUserlocationClick();

This method will be called when the map detects a click on the user location icon.

void onUserLocationBubbleClick();

This method will be called when the map detects a click on the user location bubble.

void onLabelClick(ILabel label);

This method will be called when the map detects a click on the label.

void onMapClick(LatLng latlng, String facilityId, int floor);

This method will be called when a click on the map detected.

void onMapLongClick(LatLng latlng, String facilityId, int floor);

This method will be called when a long click on the map detected.

void mapDidLoadFloor(String campusId, String facilityId, int floorId);

This method will be called when the map loads a floor in a specific facility.

public void OnFloorChange(int floor) {}

This method will be called when the map changes floor.

Set A Custom View For The POI Bubble:

public View aboutToOpenBubble(IPoi poi) {

View view;

.

.

.

return view;

}

Step 2: Register To Map Events.

public class MapListener implements SpreoDualMapViewListener {
mapView.registerMapListener(this);

Section 5: Interact With The SpreoDualMapView.

Important - you should wait for the "mapDidLoad()" event before you start interacting with the map.

Example 1: Change The Map Zoom Level.

mapView.mapZoomIn();
mapView.mapZoomOut();

Example 2: Present A Specific Campus.

mapView.presentCampus(campusId);

Example 3: Present A Specific Facility.

mapView.presentFacility(campusId, facilityId);

Example 4: Center Map To Present A Specific POI.

IPoi poi;

.

.

.

mapView.showPoi(poi);

Example 5: Center Map To Present The User Location.

mapView.showMyLocation();

Example 6: Center Map To Present A Location.

ILocation location;

.

.

.

mapView.presentLocation(location);

Example 7: Get The ID Of The Presented Floor.

String facilityId;

.

.

.

int floorid = mapView.getPresentedFloorId(facilityId);

Example 8: Get The Title Of A Specific Floor.

int floorId;

.

.

.

String title = mapView.getFloorTitleForFloorId(campusId, facilityId, floorId);

Example 9: Change The Default User Icon.

Bitmap userBitmap;

.

.

.

mapView.setUserIcon(userBitmap);

Example 10: Redraw POIs.

mapView.reDrawPois();

Example 11: Register/Unregister From MapView Events.

mapView.registerListener(this);

mapView.unregisterMapListener(this);

Example 12: Register/Unregister From Navigation Events

mapView.registerNavigationListener(this);

mapView.unregisterNavigationListener(this);

Example 13: Open POI Bubble.

IPoi poi;

.

.

.

mapView.openPoiBubble(poi)

Example 14: Close POI Bubble.

IPoi poi;

.

.

.

mapView.closeBubble(poi)

Example 15: Customizing My Parking Icon.

Bitmap icon;

.

.

.

mapView.setMyParkingMarkerIcon(icon);

Example 16: Open My Parking Bubble.

mapView.openMyParkingMarkerBubble();

Example 17: Close My Parking Bubble.

mapView.closeMyParkingMarkerBubble();

Example 18: Show/Hide All POIs On Map.

mapView.showAllPois();

mapView.hideAllPois();

Example 19: Change Icon For A POI.

IPoi poi = null;

Bitmap icon = null;

.

.

.

mapView.setIconForPoi(poi, icon);

Example 20: Change Icon For POI List.

Bitmap poiicon;

List<IPoi> poilist;

.

.

.

mapView.setIconForPoiList(poilist, poiicon);

Example 21: Set Visible POIs List.

List<String> poiIdsList;

.

.

.

mapView.setVisiblePoisWithIds(poiIdsList);

Example 22: Return To Default Zoom.

mapView.returnToDefaultZoom();

Example 23: Present A Specific Floor.

int floorId;

.

.

.

mapView.showFloorWithId(floorId);

Example 24: Present Multi Point Navigation.

List<IPoi> poilist;
List<IPoi> visitedPoiList;

.

.

.

mapView.presentMultiPoiRoute(poilist, visitedPoiList);

Example 25: Remove The Multi Point Navigation.

mapView.removeMultiPoiRoute();

Example 26: Set The Visible Labels.

List<String> labelIdsList;

.

.

.

mapView.setVisibleLabelsWithIds(labelIdsList);

Example 27: Hide All Labels.

mapView.hideAllLabels();

Example 28: Show All Labels.

mapView.showAllLabels();

Section 6: Navigation.

Example 1: Start Navigation.

Choose one of the following methods:

Navigate to a specific POI:

IPoi poi;

.

.

.

mapView.navigateTo(ipoi);

Navigate to Location:

ILocation location;

.

.

.

mapView.navigateTo(location);

Example 2: Stop Navigation.

mapView.stopNavigation();

Example 3: Simulate Navigation.

Choose one of the following methods:

Simulate navigation to specific POI:

IPoi poi;

.

.

.

mapView.simulateNavigationTo(poi);

Simulate navigation to a IPoi from a specific origin location:

ILocation origin;

IPoi poi;

.

.

.

mapView.simulateNavigationTo(*origin*, poi);

Simulate navigation to the saved parking location:

ILocation origin;

.

.

.

mapView.simulateNavigationToParking(*origin*);

Stop simulation:

mapView.stopSimulation();

Example 4: Getting Total Route Distance

IPoi poi;

.

.

.

mapView.navigateTo(ipoi);

double totalRouteDistance = mapView.getRouteDistance();

Example 5: Using Feet Units For Distance Measurement

If you want to retrieve distance value in feet units just enable this options with the SettingsProvider:

SettingsProvider.*getInstance*().setUseFeetForDistance(true);

Section 7: Enable Your Application To Receive And React To Navigation Events.

Step 1: Implement The SpreoNavigationListener Interface.

public class NavigationListener implements SpreoNavigationListener {

public void onNavigationStateChanged(NavigationState state) {}

This method will be called when the map detects a change in the navigation state.

public void OnNavigationInstructionChanged(INavInstruction instruction) {}

This method will be called when the map detects a change in the navigation instructions.

public void onNavigationArriveToPoi(IPoi arrivedToPoi, List<IPoi> nextPois) {}

This method will be called when the user arrives at a poi.

public void onInstructionRangeEntered(INavInstruction instruction)

This method is deprecated.

Step 2: Register To The Navigation Events.

mapView.registerNavigationListener(this);

Step 3: Use INavInstruction Object From OnNavigationInstructionChanged Callback To Get The Instruction Details.

public interface INavInstruction {

//  instruction text 
String getText();

//  instruction icon
Bitmap getSignBitmap();

//  distance to next navigation instruction 
double getDistance();
}

Example 1: Display Distance To Next Navigation Instruction

public class NavigationListener implements SpreoNavigationListener {

public void OnNavigationInstructionChanged(INavInstruction instruction) {

//  when the instruction changed update the custom layout with the new instruction

if (instruction != null) {

String txt = instruction.getText(); if (txt != null) {

//  output the distance to next navigation instruction with instruction text 
txt += String.format(", distance: %.2f meter(s)", instruction.getDistance());

insTextView.setText(txt);

}

}

}

}

Section 8: Save And Navigate To Parking Location.

Example 1: Save Your Current Location As Parking Location.

mapView.setCurrentLocationAsParking();

Example 2: Save A Location As Parking Location.

ILocation location;

.

.

.

mapView.setLocationAsParking(location);

Example 3: Remove Parking Location.

mapView.removeParkingLocation();

Example 4: Check If There Is A Saved Parking Location.

boolean hasparkinglocation = mapView.hasParkingLocation();

Example 5: Get The Saved Parking Location.

ILocation location = mapView.getParkingLocation();

Example 6: Navigate To The Saved Parking Location.

mapView.navigateToParking();

Section 9: Enable Your Application To Receive And React To The Device Is Real Time Location.

Step 1: Implement MyLocationListener Interface.

public class LocationListener implements MyLocationListener {

public void onLocationDelivered(ILocation location) {}

This method will be called each time a device location changes.

public void onCampusRegionEntrance(String campusId) {}

This method will be called each time the user gets onto the campus.

Public void onFacilityRegionEntrance(String campusId, String facilityId) {}

This method will be called each time the user gets into a facility.

Public void onFacilityRegionExit(String campusId, String facilityId) {}

This method will be called each time the user exits a facility.

Public void onFloorChange(String campusId, String facilityId, int floor) {}

This method will be called each time the user changes floor.

Step 2: Subscribe To Location Events.

public class LocationListener implements MyLocationListener {

SpreoLocationProvider.getInstance().subscribeForLocation(this);

Notes:

1. For unsubscribing from location events do the following:

SpreoLocationProvider.getInstance().unSubscribeFromLocationService(this);

2. For checking if the location service is tracking user location use the following method:

boolean istracking = SpreoLocationProvider.getInstance().isTrackingUserLocation()

Returns true if it is tracking user location. Otherwise, returns false.

3. If you want to get the user location use the following method

ILocation = SpreoLocationProvider.getInstance().getUserLocation();

Returns ILocation object containing the location info of the user

Section 10: Working With The POI List.

Example 1: Get The POI List For A Specific Campus.

String campusId;

.

.

.

List<IPoi> pois = PoisUtils.getAllCampusPoisList(campusId);

Example 2: Get The POI List For A Specific Facility.

String campusId;

String facilityId;

.

.

.

PoisUtils.getAllFacilityPoisList(campusId, facilityId);

Example 3: Get The POI List For A Specific Floor.

String campusId;

String facilityId;

String floorId;

.

.

.

List<IPoi> pois = PoisUtils.getAllFloorPoisList(campusId, facilityId, floorId);

Example 4: Get The POI Categories List.

List<PoiCategory> cats = PoisUtils.getPoiCategoies();

Example 5: Set The List Of The Visible Categories On Map.

List<PoiCategory> categories;
.

.

.

PoisUtils.setPoiCategoriesVisible(categories);

Example 6: Get POIs Sorted Alphabetically

String campusID = SpreoDataProvider.getCampusId();

List<IPoi> pois = PoisUtils.getAllCampusPoisList(campusID);

List<IPoi> sortedList = SortingPoiUtil.getPoisSortedAlphabetical(pois);

Example 7: Get POIs Sorted By Distance From Location

String campusID = SpreoDataProvider.getCampusId();

List<IPoi> pois = PoisUtils.getAllCampusPoisList(campusID);

List<IPoi> sortedList = SortingPoiUtil.getPoisSortedByLocation(pois, myLocation);

Example 8: Get POIs With Category

String campusID = SpreoDataProvider.getCampusId();

List<IPoi> pois = PoisUtils.getAllCampusPoisList(campusID);

List<String> categoriesList = Arrays.asList("services", "workstations");

List<IPoi> sortedList = PoisUtils.getPoisWithCategories(pois, categoriesList);

Example 9: Get POIs Sorted Alphabetically With Categories

String campusID = SpreoDataProvider.getCampusId();

List<IPoi> pois = PoisUtils.getAllCampusPoisList(campusID);

List<IPoi> sortedList = SortingPoiUtil.getPoisSortedAlphabetical(pois); List<String> categoriesList = Arrays.asList("services", "workstations");

List<IPoi> filteredList = PoisUtils.getPoisWithCategories(sortedList, categoriesList);

Example 10: Get POIs Sorted By Distance From Location With Categories.

String campusID = SpreoDataProvider.getCampusId();

List<IPoi> pois = PoisUtils.getAllCampusPoisList(campusID);

List<IPoi> sortedList = SortingPoiUtil.getPoisSortedByLocation(pois, myLocation);

List<String> categoriesList = Arrays.asList("services", "workstations");

List<IPoi> filteredList = PoisUtils.getPoisWithCategories(sortedList, categoriesList)

Example 11: Getting Distance To POI or To The List of POIs

//getting distance to single POI

IPoi poi = ...

double distance = PoisUtils.getDistanceToPoi(outdoor, poi);

//getting distance to the list of POIs

ILocation location = ...

List<IPoi> poisList = ...

List<PoiDistance> poiDistances

=   PoisUtils.getDistanceToPoiList(location, poisList, true); PoiDistance distance = poiDistances.get(0);

System.out.println("distance to "

+ distance.poi + ": " + distance.getDistance());

Section 11: Change Settings.

Example 1: Set The Type of Google Map.

int mapType = GoogleMap.MAP_TYPE_NORMAL; (use the Google map types)

SettingsProvider.getInstance().setMapType(mapType);

Example 2: Set The Navigation Route Color.

String routeHexColor = "#701E84";

SettingsProvider.getInstance().setRouteColor(routeHexColor);

Example 3: Get The Navigation Route Color.

String routeHexColor = SettingsProvider.getInstance().getRouteColor();

Example 4: Set The Visibility of The Navigation Instructions.

boolean display;
.

.

.

SettingsProvider.getInstance().setDisplayNavigationInstructionsOnMap(display);

Example 5: Get the Visibility of The Navigation Instructions.

SettingsProvider.getInstance().isDisplayNavigationInstructionsOnMap();

Example 6: Set The Status of The Instructions Sound.

boolean mute;
.

.

.

SettingsProvider.getInstance().setNavigationInstructionsSoundMute(mute);

Example 7: Get the Status of The Instructions Sound.

boolean mute = SettingsProvider.getInstance().isNavigationInstructionsSoundMute();

Example 8: Set Simplified Instruction.

Boolean isSimplified;

.

.

.

SettingsProvider.getInstance().setSimplifiedInstruction(isSimplified);

Example 9: Set The Interval For The Map Auto Follow Mode.

Set the interval for the map auto follow mode:

Sets user auto follow time interval (in milliseconds). After the specified time interval the state of auto follow will be reset (interval from the last map interaction). Set this value to -1 if you want to disable follow me mode.

long interval; (interval in Milliseconds)

.

.

.

SettingsProvider.getInstance().setUserAutoFollowTimeInterval(interval);

Example 10: Set The Map Rotation Type.

MapRotationType rotationType;
.

.

.

SettingsProvider.getInstance().setMapRotation(rotationType);

Example 11: Get The Map Rotation Type.

MapRotationType rotationType = SettingsProvider.getInstance().getMapRotationType();

Example 12: Set The Map Navigation Type.

The NavigationType is related to three states:

ESCALATORS: in which the navigation algorithm prefer to choose escalator in navigation route path.

DISABLED: in which the navigation algorithm prefer to choose elevators in navigation route path.

DEFAULT: no preference to be chosen when navigation route path is built.

NavigationType navigationType= NavigationType .DEFAULT ; SettingsProvider.getInstance().setNavigationType(navigationType);

Example 13: Set Whether To Include The Parking In The Multi POIs or Not.

boolean include;

.

.

.

SettingsProvider.getInstance().setIncludeParkingToMultiPois(include);

Example 14: Set Whether To Include Entrances In The Multi POIs or Not.

boolean include;

.

.

.

SettingsProvider.getInstance().setIncludeEntrancesToMultiPois(include);

Example 15: Set Whether To Include Switch Floors In The Multi POIs or Not.

boolean include;

.

.

.

SettingsProvider.getInstance().setIncludeEntrancesToMultiPois(include);

Example 16: Set The UI Options For Multi Point Navigation.

MultiPoiUIOptions options;

.

.

.

SettingsProvider.getInstance().setMultiPoiUIOptions(options);

Example 17: Set The Dual Map Default Zoom.

float zoom;

.

.

.

SettingsProvider.getInstance().setDualMapDefaultZoom(zoom);

Example 18: Set The Visibility of The Floor Picker.

boolean visible;

.

.

.

SettingsProvider.getInstance().setFloorPickerVisibility(visible);

Example 19: Set Feet As Measured Units For The Distance To Next Navigation Instruction

SettingsProvider.getInstance().setUseFeetForDistance(true)

Section 12: Data Provider.

Example 1: Get The SDK Version.

String version = SpreoDataProvider.getSdkVersion();

Example 2: Get The Selected Campus ID.

String campusid = SpreoDataProvider.getCampusId();

Example 3: Get The Campuses List.

List<String> campuseslist = SpreoDataProvider.getCampusesList();

Example 4: Get The Facilities List For a Specific Campus.

String campusId;
.

.

.

List<String> facilitieslist = SpreoDataProvider.getCampusFacilities(campusId);

Example 5: Get The Title of A Specific Floor.

String campusId;
.

.

.

String facilityId;
.

.

.

int floorIndex;
.

.

.

String title = SpreoDataProvider.getFloorTitle(campusId, facilityId, floorIndex);

Example 6: Get Info For A Specific Campus.

String campusId;
.

.

.

HashMap<String, Object> campusinfo = SpreoDataProvider.getCampusInfo(campusId);

The method returns a map containing the following key/value pairs:

key value / type
id id of campus (String)
name name of campus (String)
location center location in lat/lon (LatLng)

Example 7: Get Info For A Specific Facility.

String campusId;
.

.

.

String facilityId;
.

.

.

HashMap<String, Object> facilityinfo = SpreoDataProvider.getFacilityInfo(campusId, facilityId);

The method returns a map containing the following key/value pairs:

key value / type
Id id of facility (String)
name name of facility (String)
location center location center location in lat/lon (LatLng)
floors list of floors numbers (List<Integer>)

Example 8: Get Info For A Specific Floor.

String campusId;
.

.

.

String facilityId;
.

.

.

int floorIndex;
.

.

.

HashMap<String, Object> floorinfo = SpreoDataProvider.getFloorInfo(campusId, facilityId, floorIndex);

The method returns a map containing the following key/value pairs:

key value / type
title title of floor (String)

Example 9: Get The Facility of The Floor Picker (The Facility With Highest Number of Floors).

String facilityId = SpreoDataProvider.getFloorPickerFacilityId();

Section 13: Interfaces.

Interface 1: ILocation

JSONObject getAsJson();

JSONObject getAsJson();

void parse(JSONObject jsonobject);

double getX();

double getY();

double getZ();

double getLat();

double getLon();

LocationMode getLocationType();

String getCampusId();

String getFacilityId();

void setLat(double lat);

void setLon(double lon);

void setType(LocationMode locationMode);

void setCampusId(String campusId);

void setFacilityId(String facilityId);

void setX(double x);

void setY(double y);

void setZ(double z);

Interface 2: IPOI

List<String> getPoiKeywords();

void setPoiKeywords(List<String> poiKeywords); 

String getPoiuri();

void setPoiuri(String poiuri);

List<String> getPoitype();

void setPoitype(String poitype);

String getpoiDescription();

void setpoiDescription(String description); 

PointF getPoint();

void setPoint(PointF point);

double getZ();

void setZ(double z);

String getUrl();

void setUrl(String url);

String getDetails();

void setDetails(String details);

boolean isShowPoiOnMap();

void setShowPoiOnMap(boolean showPoiOnMap); 

boolean isShowPoiOnSearches();

void setShowPoiOnSearches(boolean showPoiOnSearches); 

boolean isShowPoiBubble();

void setShowPoiBubble(boolean showPoiBubble); 

boolean isPoiPlayMultyMedia();

void setPoiPlayMultyMedia(boolean poiPlayMultyMedia); 

String getPoiID();

void setPoiID(String poiID);

String getPoiNavigationType();

void setPoiNavigationType(String poiNavigationType);

double getPoiLatitude();

void setPoiLatitude(double poiLatitude);

double getPoiLongitude();

void setPoiLongitude(double poiLongitude);

boolean isShowOnZoomLevel();

void setShowOnZoomLevel(boolean showOnZoomLevel);

float getX();

float getY();

boolean isPoiClickAble();

void setPoiClickAble(boolean poiClickAble); 

boolean isInstructionsParticipate();

void setInstructionsParticipate(boolean instructionsParticipate);

String getPoiofficeinstuctions();

void setPoiofficeinstuctions(String poiofficeinstuctions); 

boolean isPoishowincategory();

void setPoishowincategory(boolean poishowincategory); 

String getMediaurl();

void setMediaurl(String mediaurl);

String getKeyWordsAsString();

ILocation getLocation();

void setLocation(ILocation location);

List<String> getActivehours();

void setActivehours(List<String> activehours); 

List<String> getPhone2hours();

void setPhone2hours(List<String> Phone2hours); 

List<String> getPhone1();

void setPhone1(List<String> Phone1);

List<String> getPhone2();

void setPhone2(List<String> Phone2);

String getEmailaddress();

void setEmailaddress(String Emailaddress);

Bitmap getIcon();

void setIcon(Bitmap icon);

Interface 3: INavInstruction

String getText();

Bitmap getSignBitmap();

int getId();

Interface 4: ConfigsUpdaterListener

public void onPreConfigsDownload();

public void onPostConfigsDownload(ResUpdateStatus status)

Section 14: Enum Types.

Enum 1: MapRotationType

STATIC,

COMPASS,

ORIENTATION

Enum 2: NavigationState

IDLE,

STARTED,

NAVIGATE,

FLOOR_CHANGED,

TURNED_BACK,

REROUTE,

SILENT_REROUTE,

STOPED,

PENDING;

Enum 3: ResUpdateStatus

API_KEY_VALIDATION_FAILD,

API_KEY_ERROR_TYPE_CONNECTION ,

API_KEY_ERROR_TYPE_INVALID_APIKEY,

API_KEY_NO_RESPONSE,

OK,

CAMPUSES_JSON_FAIL,

CAMPUSES_JSON_OK,

FAILED;

Enum 4: LocationMode.

INDOOR_MODE,

OUTDOOR_MODE;

Enum 5: NavigationType.

DEFAULT,

ESCALATORS,

DISABLED;

Section 15: Listening To Geofences.

Step 1: Implement The ZoneDetection Interface.

public class MapActivity extends Activity implements ZoneDetection {

void onZoneEnter(GeoFenceObject zone);

this method will be called when a zone enter detected.

void onZoneExit(GeoFenceObject zone);

this method will be called when a zone exit detected.

void setListeningTo(List<String> to); deprecated 
List<String> getListeningTo();deprecated

Step 2: Subscribe To The Geofence Events And Set The Geofence's Names (types).

List<String> geoFenceingListenToList = new ArrayList<String>(); geoFenceingListenToList.add("trigger");

GeoFencingUtils.subscribeToService(this, geoFenceingListenToList);