HERE Android SDK Developer's Guide

Function

The enumeration Function is a member of com.here.android.mpa.nlp.Intention.

Enumeration Summary

public static final enumeration Intention.Function

extends java.lang.Enum, java.lang.Object

Function values for FUNCTION.

[For complete information, see the section Enumeration Details]

Enum Constant Summary

Table 1. Enum Constants in Function
Fields

public static final Function NO_ACTION

No deduction has been attempted.

public static final Function NOTHING

A deduction is attempted, but failed.

public static final Function USE_LANGUAGE

Set language for navigation.

public static final Function VOLUME

Set Text to speech volume.

public static final Function SPEED_WARNING

Set speed warning for navigation.

public static final Function CHECK_SPEED

Check current speed.

public static final Function CHANGE_MAP_CENTER

Change map center.

public static final Function POI

Search for the Point of Interest or use the specified Point of Interest to provide context for the next operation.

public static final Function WEB_SEARCH

Search google for the subject.

public static final Function WEATHER

Weather request.

public static final Function TIME_FROM_TO

Time "from" "to".

public static final Function DISTANCE_FROM_TO

Distance "from" "to".

public static final Function ROUTE_FROM_TO

Routing "from" "to".

public static final Function ADD_STOPOVER

Add location to the route calculation.

public static final Function PLACE_INFO

Provide info about a POI.

public static final Function CREATE_COLLECTION

Create collection.

public static final Function COLLECT_LOCATION

Save the POI into collection.

public static final Function MOVE_COLLECTION

Move collection places.

public static final Function COPY_COLLECTION

Copy collection places.

public static final Function RENAME_COLLECTION

Rename collection places.

public static final Function LIST_COLLECTION

To list the collection places.

public static final Function CHECK_COLLECTION

Check whether a collection place exists.

public static final Function LIST_ROUTE

To list route stops.

public static final Function LIST_SEARCH_RESULTS

To list search results.

public static final Function TRAFFIC

Traffic report.

public static final Function ADDRESS

Get current or destination address based on the context.

public static final Function GPS_LOCATION

Get current GPS coordinates.

public static final Function ELEVATION

Get current elevation.

public static final Function SEARCH_RESULT_LIMIT

Set maximum number of results.

public static final Function SYS_TIME

Check system time.

public static final Function SYS_BATTERY

Check system battery.

public static final Function START_TALKING

Start talking.

public static final Function STOP_TALKING

Stop talking.

public static final Function REPEAT_AFTER_ME

Repeat ASR result.

public static final Function REPEAT

Playback the last spoken statement.

public static final Function ZOOM

Zoom in/out the map.

public static final Function DOWNLOAD

Download map data package(s).

public static final Function DAY_MODE

Set map to day mode.

public static final Function NIGHT_MODE

Set map to night mode.

public static final Function SAT_MODE

Set map to satellite mode.

public static final Function TALK_SPEED

Set talk back speed to slow, slower, fast, faster, or normal.

public static final Function USE_FIRST

Scroll to the first item of the search result.

public static final Function USE_LAST

Scroll to the last item of the search result.

public static final Function USE_PREV

Scroll to the previous item of the search result.

public static final Function USE_NEXT

Scroll to the next item of the search result.

public static final Function MORE

More of previous intent.

public static final Function LESS

Less of previous intent.

public static final Function PAUSE

Pause an operation that may have been executed from previous intent.

public static final Function RESUME

Resume an operation that may have been executed from previous intent.

public static final Function STOP

Stop an operation that may have been executed from previous intent.

public static final Function RESET

Reset any cached data.

public static final Function DELAY_NAVIGATION_START

Delay navigation.

public static final Function ACCOUNT_NAME

Account name.

public static final Function CALL_NUMBER

Make a call.

public static final Function SAVE_PHONE_NUMBER

Save the phone number.

public static final Function SEND_LOCATION

Send location information to SMS, Facebook, email, etc.

public static final Function SEND_MESSAGE

Send a text message.

public static final Function COMPASS_MODE

Enable/disable compass mode.

public static final Function TRACK_GPS

Enable/disable map tracking.

public static final Function REPORT_GEO_EVENT

Reporting Geo tagged event: crime, health, traffic.

public static final Function REMOVE

Remove based on context.

public static final Function REMOVE_FROM_MAP

Remove object(s) from the map.

public static final Function REMOVE_FROM_COLLECTION

Remove collection place(s).

public static final Function REMOVE_FROM_ROUTE

Remove a stopover from the route.

public static final Function REMOVE_FROM_CONTACTS

Remove a contact.

public static final Function RELOAD

Reload NLP database.

public static final Function NUMBER_OF

Retrieve the number items.

public static final Function Q_A

Non-functional related conversation with the end user to keep him/her engaged.

public static final Function Q_YES

Positive response to a question.

public static final Function Q_NO

Negative response to a question.

public static final Function SET_PARAM

Set system-wide parameters for DISTANCE_MEASURE, WAKEUP_WORDS , or ONLINE_DEDUCTION.

public static final Function MATH

Evaluate a simple mathmatical equation which adds, subtracts, multiplies, or divide 2 numbers.

public static final Function TEACHING

Teach the system about oneself for personalization.

public static final Function NEG_FEEDBACK

Negative feedback about incorrect NLP deduction or search/routing result does not meet user's expectation.

Method Summary

Table 2. Methods in Function
Methods

public static Function get (String name)

Retrieve enum value from the given string.

public String getName ()

Retrieve string value for the enum, e.g.

public static Function valueOf (String name)

This method retrieves the enumeration value that matches the name specified by the caller.

public static Intention.Function[] values ()

This method retrieves an array of constants of the given enum type in the order in which they are declared.

Enumeration Details

Function values for FUNCTION.

Enum Constant Details

public static final Function NO_ACTION

No deduction has been attempted.

public static final Function NOTHING

A deduction is attempted, but failed. e.g.

          
      {
   "text":["what's the meaning of life"],
   "func":["NOTHING"],
   "reply":["Come again"]
 }               

public static final Function USE_LANGUAGE

Set language for navigation. e.g.

          
      {
   :
   "text":["use english for navigation"],
   "func":["USE_LANGUAGE"],
   "target":["english"]
 }               

public static final Function VOLUME

Set Text to speech volume. e.g.

          
      {
   :
   "text":["turn down the volume"],
   "func":["VOLUME"],
   "target":["less"]
 }               

public static final Function SPEED_WARNING

Set speed warning for navigation. e.g.

          
      {
   :
   "text":["stop speed warning"],
   "func":["SPEED_WARNING"],
   "toggle":["off_"]
 }               

public static final Function CHECK_SPEED

Check current speed. e.g.

          
      {
   :
   "text":["what's my speed"],
   "func":["CHECK_SPEED"]
 }               

public static final Function CHANGE_MAP_CENTER

Change map center. e.g.

          
      {
   :
   "text":["change map center to seattle"],
   "func":["CHANGE_MAP_CENTER"],
   "target":["seattle"]
 }               

public static final Function POI

Search for the Point of Interest or use the specified Point of Interest to provide context for the next operation. e.g

          
      {
   :
   "text":["Where is Seattle?"],
   "func":["POI"],
   "target":["Seattle"]
 }               

This is an intent to search for the point of interest specified by TARGET.

For another example, assuming there is an intent to search for "Starbucks" prior to user saying "second one".

          
      {
    :
    "text":["second one"],
    "func":["POI"],
    "target":["2"]
 }               

This is an intent to use the second search result for the next operation.

Search google for the subject. e.g.

          
      {
   :
   "text":["google seattle"],
   "func":["WEB_SEARCH"],
   "target":["seattle"]
 }               

public static final Function WEATHER

Weather request. e.g.

          
      {
   :
   "text":["what's the weather in seattle today"],
   "func":["WEATHER"],
   "when":["today"],
   "where":["seattle"]
 }               

public static final Function TIME_FROM_TO

Time "from" "to". e.g.

          
      {
   :
    "text":["how long does it take to go from vancouver to
seattle?"],
    "func":["TIME_FROM_TO"],
    "from":["vancouver"],
    "target":["seattle"]
 }               

public static final Function DISTANCE_FROM_TO

Distance "from" "to". e.g.

          
      {
   :
   "text":["how far is it from vancouver to seattle?"],
   "func":["DISTANCE_FROM_TO"],
   "from":["vancouver"],
   "target":["seattle"]
 }               

public static final Function ROUTE_FROM_TO

Routing "from" "to". e.g.

          
      {
   :
   "text":["Show me the route from vancouver to seattle."],
   "func":["ROUTE_FROM_TO"],
   "from":["vancouver"],
   "target":["seattle"]
 }               

public static final Function ADD_STOPOVER

Add location to the route calculation. e.g.

          
      {
   :
  "text":["stop at gas station in seattle"],
  "func":["ADD_STOPOVER"],
  "optimize":["false_"],
  "stopover":["gas station"],
  "where_s":["seattle"]
 }               

public static final Function PLACE_INFO

Provide info about a POI. e.g.

          
      {
   :
  "text":["tell me about seattle"],
  "func":["PLACE_INFO"],
  "target":["seattle"]
 }               

public static final Function CREATE_COLLECTION

Create collection. e.g.

          
      {
   :
   "text":["create favorites"],
   "func":["CREATE_COLLECTION"]
 }               

public static final Function COLLECT_LOCATION

Save the POI into collection. e.g.

          
      {
   :
   "text":["save abc"],
   "func":["COLLECT_LOCATION"],
   "target":["abc"]
 }               

public static final Function MOVE_COLLECTION

Move collection places. e.g.

          
      {
   :
   "text":["move collection foo to bar"],
   "func":["MOVE_COLLECTION"],
   "from":["foo"],
   "target":["bar"]
 }               

public static final Function COPY_COLLECTION

Copy collection places. e.g.

          
      {
   :
   "text":["copy collection foo to bar"],
   "func":["COPY_COLLECTION"],
   "from":["foo"],
   "target":["bar"]
 }               

public static final Function RENAME_COLLECTION

Rename collection places. e.g.

          
      {
   :
   "text":["rename collection foo to bar"],
   "func":["RENAME_COLLECTION"],
   "from":["foo"],
   "target":["bar"]
 }               

public static final Function LIST_COLLECTION

To list the collection places. e.g.

          
      {
   :
   "text":["list favorites collection"],
   "func":["LIST_COLLECTION"]
 }               

public static final Function CHECK_COLLECTION

Check whether a collection place exists. e.g.

          
      {
   :
   "text":["do i have home in my collection?"],
   "func":["CHECK_COLLECTION"],
   "target":["home"]
 }               

public static final Function LIST_ROUTE

To list route stops. e.g.

          
      {
   :
   "text":["what are my stops"],
   "func":["LIST_ROUTE"]
 }               

public static final Function LIST_SEARCH_RESULTS

To list search results. e.g.

          
      {
   :
   "text":["list all found places"],
   "func":["LIST_SEARCH_RESULTS"]
 }               

public static final Function TRAFFIC

Traffic report. e.g.

          
      {
   :
   "text":["how is the traffic in seattle"],
   "func":["TRAFFIC"],
   "where":["seattle"]
 }               

public static final Function ADDRESS

Get current or destination address based on the context. e.g.

          
      {
   :
   "text":["what is the address of space needle"],
   "func":["ADDRESS"],
   "target":["space needle"]
 }               

public static final Function GPS_LOCATION

Get current GPS coordinates. e.g.

          
      {
   :
   "text":["what are my coordinates"],
   "func":["GPS_LOCATION"]
 }               

public static final Function ELEVATION

Get current elevation. e.g.

          
      {
   :
   "text":["what is my current elevation"],
   "func":["ELEVATION"]
 }               

public static final Function SEARCH_RESULT_LIMIT

Set maximum number of results. e.g.

          
      {
   :
   "text":["limit search results to 5"],
   "func":["SEARCH_RESULT_LIMIT"],
   "search_count":["5"]
 }               

public static final Function SYS_TIME

Check system time. e.g.

          
      {
   :
   "text":["what time is it"],
   "func":["SYS_TIME"]
 }               

public static final Function SYS_BATTERY

Check system battery. e.g.

          
      {
   :
   "text":["how much battery left"],
   "func":["SYS_BATTERY"]
 }               

public static final Function START_TALKING

Start talking. e.g.

          
      {
   :
   "text":["tell me in kilometers"],
   "func":["START_TALKING","SET_PARAM"],
   "distance_measure":["km"],
   "reply":["sure"]
 }               

public static final Function STOP_TALKING

Stop talking. e.g.

          
      {
   :
   "text":["stop talking"],
   "func":["STOP_TALKING"],
   "reply":["sure"]
 }               

public static final Function REPEAT_AFTER_ME

Repeat ASR result. e.g.

          
      {
   :
   "text":["repeat what i say"],
   "func":["REPEAT_AFTER_ME"],
   "toggle":["on_"]
 }               

public static final Function REPEAT

Playback the last spoken statement. e.g.

          
      {
   :
   "text":["say that again"],
   "func":["REPEAT"]
 }               

public static final Function ZOOM

Zoom in/out the map. e.g.

          
      {
   :
   "text":["zoom in"],
   "func":["ZOOM"],
   "target":["more"]
 }               

public static final Function DOWNLOAD

Download map data package(s). e.g.

          
      {
   :
   "text":["download british columbia"],
   "func":["DOWNLOAD"],
   "target":["british columbia"]
 }               

public static final Function DAY_MODE

Set map to day mode. e.g.

          
      {
   :
   "text":["use day mode"],
   "func":["DAY_MODE"]
 }               

public static final Function NIGHT_MODE

Set map to night mode. e.g.

          
      {
   :
   "text":["use night mode"],
   "func":["NIGHT_MODE"]
 }               

public static final Function SAT_MODE

Set map to satellite mode. e.g.

          
      {
   :
   "text":["use satellite mode"],
   "func":["SAT_MODE"]
 }               

public static final Function TALK_SPEED

Set talk back speed to slow, slower, fast, faster, or normal. e.g.

          
      {
   :
   "text":["talk fast"],
   "func":["TALK_SPEED"],
   "target":["max"]
 }               

public static final Function USE_FIRST

Scroll to the first item of the search result. e.g.

          
      {
   :
   "text":["use first"],
   "func":["USE_FIRST"]
 }               

public static final Function USE_LAST

Scroll to the last item of the search result. e.g.

          
      {
   :
   "text":["use last"],
   "func":["USE_LAST"]
 }               

public static final Function USE_PREV

Scroll to the previous item of the search result. e.g.

          
      {
   :
   "text":["use previous"],
   "func":["USE_PREV"]
 }               

public static final Function USE_NEXT

Scroll to the next item of the search result. e.g.

          
      {
   :
   "text":["use next"],
   "func":["USE_NEXT"]
 }               

public static final Function MORE

More of previous intent. e.g. if zoom in was the previous intent, this intent is to zoom in further.

          
      {
   :
   "text":["more"],
   "func":["MORE"]
 }               

public static final Function LESS

Less of previous intent. e.g. if zoom in was the previous intent, this intent is to zoom out a little.

          
      {
   :
   "text":["less"],
   "func":["LESS"]
 }               

public static final Function PAUSE

Pause an operation that may have been executed from previous intent. e.g. if navigation was started prior to this, this intent will be to pause navigation.

          
      {
   :
   "text":["pause"],
   "func":["PAUSE"]
 }               

public static final Function RESUME

Resume an operation that may have been executed from previous intent. e.g. if navigation was paused prior to this, this intent will be to resume navigation.

          
      {
   :
   "text":["continue"],
   "func":["RESUME"]
 }               

public static final Function STOP

Stop an operation that may have been executed from previous intent. e.g. if navigation was started prior to this, this intent will be to stop navigation.

          
      {
   :
   "text":["stop"],
   "func":["STOP"]
 }               

public static final Function RESET

Reset any cached data. e.g.

          
      {
   :
   "text":["reset"],
   "func":["RESET"],
   "reply":["sure"]
 }               

public static final Function DELAY_NAVIGATION_START

Delay navigation. The intent is not to automatically start navigation for "take me to McDonalds", but to show the route only. e.g.

          
      {
   :
   "text":["don't start navigation right away"],
   "func":["DELAY_NAVIGATION_START"],
   "toggle":["on_"]
 }               

public static final Function ACCOUNT_NAME

Account name. e.g.

          
      {
   :
   "text":["what is my account name"],
   "func":["ACCOUNT_NAME"]
 }               

public static final Function CALL_NUMBER

Make a call. e.g.

          
      {
   :
   "text":["call emergency"],
   "func":["CALL_NUMBER"],
   "by_number":["true"],
   "target":["911"]
 }               

public static final Function SAVE_PHONE_NUMBER

Save the phone number. e.g.

          
      {
   :
   "text":["save 911 as emergency"],
   "func":["SAVE_PHONE_NUMBER"],
   "contact":["emergency"],
   "target":["911"]
 }               

public static final Function SEND_LOCATION

Send location information to SMS, Facebook, email, etc. e.g.

          
      {
   :
   "text":["publish my location on facebook"],
   "func":["SEND_LOCATION"],
   "target":["facebook"]
 }               

public static final Function SEND_MESSAGE

Send a text message. e.g.

          
      {
   :
   "text":["send a message to my wife that i will be late for
dinner"],
   "func":["SEND_MESSAGE"],
   "message":["i will be late for dinner"],
   "target":["wife"]
 }               

public static final Function COMPASS_MODE

Enable/disable compass mode. When enabled, map will be shown with north up. e.g.

          
      {
   :
   "text":["enable compass"],
   "func":["COMPASS_MODE"],
   "toggle":["on_"]
 }               

public static final Function TRACK_GPS

Enable/disable map tracking. When enabled, current location will always be visible at the center of the map. e.g.

          
      {
   :
   "text":["center the map to my current location"],
   "func":["TRACK_GPS"],
   "toggle":["on_"]
 }               

public static final Function REPORT_GEO_EVENT

Reporting Geo tagged event: crime, health, traffic. e.g.

          
      {
   :
   "text":["i just saw a car accident here"],
   "func":["REPORT_GEO_EVENT"],
   "target":["accident"],
   "type":["event_traffic"]
 }               

public static final Function REMOVE

Remove based on context. Context for this may be provided through previous intent and/or additional parameters of the intent. e.g. if there is a stopover added on the route prior to this, this intent will be to remove the stopover from the route.

          
      {
   :
   "text":["remove it"],
   "func":["REMOVE"],
   "target":["it_there"]
 }               

public static final Function REMOVE_FROM_MAP

Remove object(s) from the map. e.g.

          
      {
   :
   "text":["remove markers from the map"],
   "func":["REMOVE_FROM_MAP"],
   "target":["markers"]
 }               

public static final Function REMOVE_FROM_COLLECTION

Remove collection place(s). e.g.

          
      {
   :
   "text":["remove foo from bar collection"],
   "func":["REMOVE_FROM_COLLECTION"],
   "col_name":["bar"],
   "target":["foo"]
 }               

public static final Function REMOVE_FROM_ROUTE

Remove a stopover from the route. e.g.

          
      {
   :
   "text":["remove gas station from the route"],
   "func":["REMOVE_FROM_ROUTE"],
   "target":["gas station"]
 }               

public static final Function REMOVE_FROM_CONTACTS

Remove a contact. e.g.

          
      {
   :
   "text":["remove bob smith from phone list"],
   "func":["REMOVE_FROM_CONTACTS"],
   "target":["bob smith"]
 }               

public static final Function RELOAD

Reload NLP database. e.g.

          
      {
   "text":["reload database"],
   "func":["RELOAD"],
   "reply":["Database reloaded"]
 }               

public static final Function NUMBER_OF

Retrieve the number items. e.g.

          
      {
   "text":["how many items is in my all collections"],
   "func":["NUMBER_OF"],
   "col_name":["all_obj"],
   "type":["obj_collection"]
 }               

public static final Function Q_A

Non-functional related conversation with the end user to keep him/her engaged. e.g.

          
      {
   :
   "text":["what are you doing"],
   "func":["Q_A"],
   "reply":["Trying to sleep"]
 }               

public static final Function Q_YES

Positive response to a question. e.g.

          
      {
   :
   "text":["yes"],
   "func":["Q_YES"]
 }               

public static final Function Q_NO

Negative response to a question. e.g.

          
      {
   :
   "text":["no"],
   "func":["Q_NO"]
 }               

public static final Function SET_PARAM

Set system-wide parameters for DISTANCE_MEASURE, WAKEUP_WORDS , or ONLINE_DEDUCTION. e.g.

          
      {
   :
   "text":["use imperial system from now on"],
   "func":["SET_PARAM"],
   "distance_measure":["mile"]
 }               

public static final Function MATH

Evaluate a simple mathmatical equation which adds, subtracts, multiplies, or divide 2 numbers. e.g.

          
      {
   :
   "text":["what is 5 plus 6"],
   "func":["MATH"],
   "arg1":["5"],
   "arg2":["6"],
   "op":["+"]
 }               

public static final Function TEACHING

Teach the system about oneself for personalization. e.g.

          
      {
  :
  "text":["my name is bob"],
  "func":["TEACHING"],
  "your_name":["bob"]
 }               

public static final Function NEG_FEEDBACK

Negative feedback about incorrect NLP deduction or search/routing result does not meet user's expectation. e.g.

          
      {
  :
  "text":["this is not what i meant"],
  "func":["NEG_FEEDBACK"],
  "reply":["Sorry"]
 }               

Method Details

public static Function get (String name)

Retrieve enum value from the given string. e.g. Function.get("POI"); returns Function.POI .

Parameters:

  • name

    string to be matched

Returns:

null if there is no enum with the specified name

public String getName ()

Retrieve string value for the enum, e.g. Function.POI.getName(); returns "POI" .

Returns:

String value for the enum

public static Function valueOf (String name)

This method retrieves the enumeration value that matches the name specified by the caller.

Parameters:

  • name

    A string containing the name of the enumeration member whose value is to be retrieved.

public static Intention.Function[] values ()

This method retrieves an array of constants of the given enum type in the order in which they are declared.