Package 

Interface IVoiceContextProvider

  • 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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.

      • 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.