Android Java SDK for Sygic 3D
Api Class Reference

Basic class providing set of functions to command Navigation. More...

Public Member Functions

void setSoundMutex (boolean mutex) throws RemoteException
 
void setOnSoundListener (OnSoundListener listener)
 
void setOnTtsListener (OnTtsListener listener)
 
void connect ()
 Connect to the remote service. More...
 
void disconnect ()
 Disconnect from the remote service. More...
 
void show (boolean background) throws RemoteException
 Show the navigation. More...
 
void bringApplicationToBackground ()
 Bring navigation to background. More...
 
void registerCallback () throws RemoteException
 Register callback to receive events from remote app. More...
 
void unregisterCallback () throws RemoteException
 Unregister callback. More...
 
boolean isAppRunning () throws RemoteException
 Checks if the Navi Thread is running. More...
 
void stopSygicService ()
 Stop SygicService. More...
 

Static Public Member Functions

static Api init (Context context, String pckgName, String className, ApiCallback callback)
 Initializes the Api class. More...
 
static Api getInstance ()
 Gets the single instance of Api. More...
 
static boolean isApplicationRunning (int maxTime) throws GeneralException
 Verifies whether Navigation is running. More...
 
static void endApplication (int maxTime) throws GeneralException
 Ends Navigation application. More...
 
static boolean isApplicationInForeground (int maxTime) throws GeneralException
 
static String getUniqueDeviceId (int maxTime) throws GeneralException
 Returns device ID. More...
 
static String getMapVersion (String iso, int maxTime) throws GeneralException
 Gets the map version of a given country's ISO code. More...
 
static NaviVersion getApplicationVersion (int maxTime) throws GeneralException
 Returns the application version and build number. More...
 
static ApiVersion getSdkVersion ()
 Returns the sdk api version and build number. More...
 

Static Public Attributes

static final String CLASS_AURA = "com.sygic.aura.SygicService"
 
static final String CLASS_TRUCK = "com.sygic.aura.SygicService"
 
static final String CLASS_DRIVE = "com.sygic.drive.SygicService"
 
static final String INTENT_ACTION_MINIMIZE_REMOTE = "com.sygic.intent.action.minimize_remote"
 

Package Functions

IRemoteSygicService getService ()
 

Detailed Description

Basic class providing set of functions to command Navigation.

Member Function Documentation

◆ bringApplicationToBackground()

void bringApplicationToBackground ( )

Bring navigation to background.

Exceptions
RemoteExceptionthe remote exception

◆ connect()

void connect ( )

Connect to the remote service.

◆ disconnect()

void disconnect ( )

Disconnect from the remote service.

◆ endApplication()

static void endApplication ( int  maxTime) throws GeneralException
static

Ends Navigation application.

Parameters
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), and Api.getService().

◆ getApplicationVersion()

static NaviVersion getApplicationVersion ( int  maxTime) throws GeneralException
static

Returns the application version and build number.

Parameters
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
model.NaviVersion instance containing the version and build number
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), and Api.getService().

◆ getInstance()

static Api getInstance ( )
static

Gets the single instance of Api.

Returns
single instance of Api

References ApiCallback.onEvent(), ApiCallback.onServiceConnected(), ApiCallback.onServiceDisconnected(), OnSoundListener.onSound(), and OnTtsListener.onTts().

Referenced by ApiItinerary.addEntryToItinerary(), ApiItinerary.addItinerary(), ApiOnline.addMapCorrectionEvents(), ApiPoi.addPoi(), ApiPoi.addPoiCategory(), ApiOptions.changeApplicationOptions(), ApiOnline.clearMapCorrectionEvents(), ApiItinerary.deleteEntryInItinerary(), ApiItinerary.deleteItinerary(), ApiPoi.deletePoi(), ApiPoi.deletePoiCategory(), Api.endApplication(), ApiPoi.findNearbyPoi(), ApiPoi.findNearbyPoiList(), ApiDialog.flashMessage(), ApiNavigation.getActualGpsPosition(), Api.getApplicationVersion(), ApiInfo.getCurrentSpeedLimit(), ApiHistory.getHistoryList(), ApiItinerary.getItineraryList(), ApiLocation.getLocationAddressInfo(), ApiLocation.getLocationRoadInfo(), ApiOnline.getMapCorrectionEvents(), Api.getMapVersion(), ApiOnline.getMobileData(), ApiPoi.getPoiCategoryList(), ApiPoi.getPoiList(), ApiPoi.getPoiOnRoute(), ApiNavigation.getRouteStatus(), Api.getUniqueDeviceId(), ApiOnline.goOnline(), ApiGps.gpsSwitchOn(), Api.isApplicationInForeground(), Api.isApplicationRunning(), Api.isAppRunning(), ApiNavigation.loadComputedRoute(), ApiLocation.locationFromAddress(), ApiLocation.locationFromAddressEx(), ApiPoi.makeUserPoiVisible(), ApiNavigation.navigateToAddress(), ApiOnline.onlineServicesLogin(), ApiItinerary.optimizeRoute(), ApiTts.playSound(), Api.registerCallback(), ApiOnline.resetMobileData(), ApiOptions.setDefaultValues(), ApiOnline.setMobileData(), ApiPoi.setPoiWarning(), ApiItinerary.setRoute(), Api.setSoundMutex(), Api.show(), ApiMaps.showCoordinatesOnMap(), ApiDialog.showMessage(), ApiMaps.showRectangleOnMap(), ApiItinerary.skipNextWaypoint(), ApiNavigation.startNavigation(), ApiNavigation.stopNavigation(), and Api.unregisterCallback().

◆ getMapVersion()

static String getMapVersion ( String  iso,
int  maxTime 
) throws GeneralException
static

Gets the map version of a given country's ISO code.

Parameters
isoString describing the country's ISO code to retrieve the version from
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
String instance containing the version
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), and Api.getService().

◆ getSdkVersion()

static ApiVersion getSdkVersion ( )
static

Returns the sdk api version and build number.

Returns
model.ApiVersion instance containing the version and build number

◆ getService()

IRemoteSygicService getService ( )
package

Referenced by ApiItinerary.addEntryToItinerary(), ApiItinerary.addItinerary(), ApiOnline.addMapCorrectionEvents(), ApiPoi.addPoi(), ApiPoi.addPoiCategory(), ApiOptions.changeApplicationOptions(), ApiOnline.clearMapCorrectionEvents(), ApiItinerary.deleteEntryInItinerary(), ApiItinerary.deleteItinerary(), ApiPoi.deletePoi(), ApiPoi.deletePoiCategory(), Api.endApplication(), ApiPoi.findNearbyPoi(), ApiPoi.findNearbyPoiList(), ApiDialog.flashMessage(), ApiNavigation.getActualGpsPosition(), Api.getApplicationVersion(), ApiInfo.getCurrentSpeedLimit(), ApiHistory.getHistoryList(), ApiItinerary.getItineraryList(), ApiLocation.getLocationAddressInfo(), ApiLocation.getLocationRoadInfo(), ApiOnline.getMapCorrectionEvents(), Api.getMapVersion(), ApiOnline.getMobileData(), ApiPoi.getPoiCategoryList(), ApiPoi.getPoiList(), ApiPoi.getPoiOnRoute(), ApiNavigation.getRouteStatus(), Api.getUniqueDeviceId(), ApiOnline.goOnline(), ApiGps.gpsSwitchOn(), Api.isApplicationInForeground(), Api.isApplicationRunning(), Api.isAppRunning(), ApiNavigation.loadComputedRoute(), ApiLocation.locationFromAddress(), ApiLocation.locationFromAddressEx(), ApiPoi.makeUserPoiVisible(), ApiNavigation.navigateToAddress(), ApiOnline.onlineServicesLogin(), ApiItinerary.optimizeRoute(), ApiTts.playSound(), Api.registerCallback(), ApiOnline.resetMobileData(), ApiOptions.setDefaultValues(), ApiOnline.setMobileData(), ApiPoi.setPoiWarning(), ApiItinerary.setRoute(), Api.setSoundMutex(), Api.show(), ApiMaps.showCoordinatesOnMap(), ApiDialog.showMessage(), ApiMaps.showRectangleOnMap(), ApiItinerary.skipNextWaypoint(), ApiNavigation.startNavigation(), ApiNavigation.stopNavigation(), and Api.unregisterCallback().

◆ getUniqueDeviceId()

static String getUniqueDeviceId ( int  maxTime) throws GeneralException
static

Returns device ID.

Parameters
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
String describing the device ID.
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), and Api.getService().

◆ init()

static Api init ( Context  context,
String  pckgName,
String  className,
ApiCallback  callback 
)
static

Initializes the Api class.

Parameters
contextthe application context
pckgNamethe package name of the navigation application connecting to. For Sygic Professional it is "com.sygic.fleet"
classNamethe class name of the navigation service connecting to. For Sygic Professional Navigation it is "com.sygic.fleet.SygicService"
callbackthe callback to retrieve events from navigation application
Returns
the api instance
Remarks
For application and service identificators the primary choice is to use "com.sygic.fleet" and "com.sygic.fleet.SygicService".
The other options are:
  • "com.sygic.truck" and "com.sygic.truck.SygicService" for Sygic Truck Navigation for consumers
  • "com.sygic.taxi" and "com.sygic.taxi.SygicService" for Sygic Taxi Navigation
  • "com.sygic.drive" and "com.sygic.drive.SygicService" for Sygic 2D Navigation
But please note that "com.sygic.truck" will cease to support SDK functionality in future.

◆ isApplicationInForeground()

static boolean isApplicationInForeground ( int  maxTime) throws GeneralException
static
Parameters
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
true if connected Sygic navigation is in foreground, false otherwise
Exceptions
GeneralException

References Api.getInstance(), and Api.getService().

◆ isApplicationRunning()

static boolean isApplicationRunning ( int  maxTime) throws GeneralException
static

Verifies whether Navigation is running.

Parameters
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
true if Navigation is running otherwise false
Exceptions
GeneralException

References Api.getInstance(), and Api.getService().

◆ isAppRunning()

boolean isAppRunning ( ) throws RemoteException

Checks if the Navi Thread is running.

Returns
true, if is running

References Api.getInstance(), and Api.getService().

◆ registerCallback()

void registerCallback ( ) throws RemoteException

Register callback to receive events from remote app.

Exceptions
RemoteExceptionthe remote exception

References Api.getInstance(), and Api.getService().

◆ setOnSoundListener()

void setOnSoundListener ( OnSoundListener  listener)

◆ setOnTtsListener()

void setOnTtsListener ( OnTtsListener  listener)

◆ setSoundMutex()

void setSoundMutex ( boolean  mutex) throws RemoteException

◆ show()

void show ( boolean  background) throws RemoteException

Show the navigation.

Starts if not already running.

Parameters
backgroundif true navigation will start in background and will not be shown
Exceptions
RemoteExceptionthe remote exception

References Api.getInstance(), and Api.getService().

◆ stopSygicService()

void stopSygicService ( )

Stop SygicService.

◆ unregisterCallback()

void unregisterCallback ( ) throws RemoteException

Unregister callback.

Exceptions
RemoteExceptionthe remote exception

References Api.getInstance(), and Api.getService().

Member Data Documentation

◆ CLASS_AURA

final String CLASS_AURA = "com.sygic.aura.SygicService"
static

◆ CLASS_DRIVE

final String CLASS_DRIVE = "com.sygic.drive.SygicService"
static

◆ CLASS_TRUCK

final String CLASS_TRUCK = "com.sygic.aura.SygicService"
static

◆ INTENT_ACTION_MINIMIZE_REMOTE

final String INTENT_ACTION_MINIMIZE_REMOTE = "com.sygic.intent.action.minimize_remote"
static