public interface Utils
Modifier and Type | Method and Description |
---|---|
void |
getMapInfo(MapInfo.Listener callback)
Get information about the currently active map on the device.
|
void |
getNDSMapUpdateNetworkTypes(NDSMapUpdateNetworkType.Listener listener)
Get the allowed network types for NDS Map Updates.
|
void |
getVehicleProfile(VehicleProfile.Listener listener)
Get information about the currently active
VehicleProfile . |
void |
isVehicleProfileModificationRestricted(VehicleProfileModificationRestrictedListener listener)
Get whether modification of vehicle profile is forbidden or not.
|
void |
setNDSMapUpdateNetworkTypes(NDSMapUpdateNetworkType networkTypes,
NDSMapUpdateNetworkType.Listener listener)
Set the allowed network types for NDS Map Updates.
|
void |
setVehicleProfile(VehicleProfile profile,
VehicleProfile.Listener listener)
Set information to the currently active
VehicleProfile . |
void |
setVehicleProfileModificationRestricted(boolean vehicleProfileModificationRestricted,
VehicleProfileModificationRestrictedListener listener)
Set whether modification of vehicle profile is forbidden or not.
|
void getMapInfo(MapInfo.Listener callback)
callback
- The MapInfo.Listener
to receive map information.java.lang.IllegalArgumentException
- if the listener is null.void getVehicleProfile(VehicleProfile.Listener listener)
VehicleProfile
.
The passed in listener is only active until the result of the call has been returned.
Once a result has been returned the listener won't receive any more callbacks (but can be re-used).listener
- The VehicleProfile.Listener
to receive vehicle profile information.java.lang.IllegalArgumentException
- if the listener is null.void setVehicleProfile(VehicleProfile profile, VehicleProfile.Listener listener)
VehicleProfile
. If no profile is currently
active, a new one will be created and updated. An empty VehicleProfile object can be created
with a call to NavAppClient.makeVehicleProfile()
. The object can then be initialized by
setting the desired attributes (e.g. setAttributeLong
, setAttributeString
and so on).
For a list of available attributes, see the documentation of VehicleProfile
.
Attributes that have not been specified will be left unchanged in the application, but a
consistency check will be performed before accepting the modification (e.g. if we are only setting
the vehicle type as "CAR", the list of hazardous material already set in the application must be empty).
The passed in listener is only active until the result of the call has been returned.
Once a result has been returned the listener won't receive any more callbacks (but can be re-used).
Note that setting a profile will invalidate any currently active trip as the parameters for the trip change.profile
- The VehicleProfile
to be set.listener
- The VehicleProfile.Listener
to receive vehicle profile information.java.lang.IllegalArgumentException
- if the listener is null.void getNDSMapUpdateNetworkTypes(NDSMapUpdateNetworkType.Listener listener)
listener
- The NDSMapUpdateNetworkType.Listener
to receive network type.void setNDSMapUpdateNetworkTypes(NDSMapUpdateNetworkType networkTypes, NDSMapUpdateNetworkType.Listener listener)
networkTypes
- The NDSMapUpdateNetworkType
to be set.listener
- The NDSMapUpdateNetworkType.Listener
to receive network type information after setting.void isVehicleProfileModificationRestricted(VehicleProfileModificationRestrictedListener listener)
listener
- the listener to receive if vehicle profile modification is restricted or not.void setVehicleProfileModificationRestricted(boolean vehicleProfileModificationRestricted, VehicleProfileModificationRestrictedListener listener)
vehicleProfileModificationRestricted
- true
to restrict vehicle profile modification, false
to allow it.listener
- The listener to receive if modification of vehicle profile is restricted or not.