-
- All Implemented Interfaces:
public interface IVoiceContextProvider
This interface defines the context related methods that are requested for a proper running of the voice service. Client is responsible to provide an implementation of this interface.
-
-
Method Summary
Modifier and Type Method Description abstract Context
getContext()
This method should retrieve the android context. abstract String
getPackageName()
This method should retrieve the client application package name. abstract Boolean
isLocationPermissionGranted()
This method should retrieve the state of the location permission. abstract Boolean
isMicrophonePermissionGranted()
This method should retrieve the state of the microphone permission. abstract List<Brand>
getBrands()
This method should retrieve the list of the available brands. abstract Boolean
shouldMuteNotificationsOnDevice()
This method tells the SDK if the notifications should be muted while the user interacts with the voice service. abstract Integer
getLastInteractionTime()
This method should retrieve the time in seconds passed from the last user interaction. abstract VoiceGeoLocation
getCurrentLocation()
This method retrieves the current location of the user in order to be sent to voice service. -
-
Method Detail
-
getContext
abstract Context getContext()
This method should retrieve the android context.
-
getPackageName
abstract String getPackageName()
This method should retrieve the client application package name.
-
isLocationPermissionGranted
abstract Boolean isLocationPermissionGranted()
This method should retrieve the state of the location permission.
-
isMicrophonePermissionGranted
abstract Boolean isMicrophonePermissionGranted()
This method should retrieve the state of the microphone permission.
-
getBrands
abstract List<Brand> getBrands()
This method should retrieve the list of the available brands.
-
shouldMuteNotificationsOnDevice
abstract Boolean shouldMuteNotificationsOnDevice()
This method tells the SDK if the notifications should be muted while the user interacts with the voice service. This is needed when the SDK runs on a phone or tablet, because the SpeechRecognizer plays a default "beep" sound when the speech recognizing starts and ends. In order to not hear this default "beep" we need to mute the notifications on the device. The notifications are muted while the user interacts with the voice service and after they are unmuted.
This should be used only when the SDK is used on phone or tablet.
-
getLastInteractionTime
abstract Integer getLastInteractionTime()
This method should retrieve the time in seconds passed from the last user interaction. For a proper running of voice service, the client is responsible to provide an implementation for this which calculates the required value.
-
getCurrentLocation
abstract VoiceGeoLocation getCurrentLocation()
This method retrieves the current location of the user in order to be sent to voice service.
-
-
-
-