Class ShadowVoiceInteractionSession


  • @Implements(value=android.service.voice.VoiceInteractionSession.class,
                minSdk=21)
    public class ShadowVoiceInteractionSession
    extends java.lang.Object
    Shadow implementation of VoiceInteractionSession.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void create()
      Simulates the creation of the VoiceInteractionSession, as if it was being created by the framework.
      com.google.common.collect.ImmutableList<android.content.Intent> getAssistantActivityIntents()
      Returns the list of Intent instances passed into VoiceInteractionSession.startAssistantActivity(Intent) in invocation order.
      android.content.Intent getLastAssistantActivityIntent()
      Returns the last Intent passed into VoiceInteractionSession.startAssistantActivity(Intent) or null if there wasn't any.
      android.content.Intent getLastVoiceActivityIntent()
      Returns the last Intent passed into VoiceInteractionSession.startVoiceActivity(Intent) or null if there wasn't any.
      com.google.common.collect.ImmutableList<android.content.Intent> getVoiceActivityIntents()
      Returns the list of Intent instances passed into VoiceInteractionSession.startVoiceActivity(Intent) in invocation order.
      boolean isFinishing()
      Returns whether the VoiceInteractionSession is in the process of being destroyed and finishing.
      boolean isUiEnabled()
      Returns whether the UI is set to be enabled through VoiceInteractionSession.setUiEnabled(boolean).
      boolean isWindowShowing()
      Returns whether the UI window from VoiceInteractionSession is currently showing.
      void setStartVoiceActivityException​(java.lang.RuntimeException exception)
      Sets a RuntimeException that should be thrown when VoiceInteractionSession.startVoiceActivity(Intent) is invoked.
      • Methods inherited from class java.lang.Object

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

      • ShadowVoiceInteractionSession

        public ShadowVoiceInteractionSession()
    • Method Detail

      • create

        public void create()
        Simulates the creation of the VoiceInteractionSession, as if it was being created by the framework.

        This method must be called before state changing methods of VoiceInteractionSession.

      • getLastAssistantActivityIntent

        @Nullable
        public android.content.Intent getLastAssistantActivityIntent()
        Returns the last Intent passed into VoiceInteractionSession.startAssistantActivity(Intent) or null if there wasn't any.
      • getAssistantActivityIntents

        public com.google.common.collect.ImmutableList<android.content.Intent> getAssistantActivityIntents()
        Returns the list of Intent instances passed into VoiceInteractionSession.startAssistantActivity(Intent) in invocation order.
      • getLastVoiceActivityIntent

        @Nullable
        public android.content.Intent getLastVoiceActivityIntent()
        Returns the last Intent passed into VoiceInteractionSession.startVoiceActivity(Intent) or null if there wasn't any.
      • getVoiceActivityIntents

        public com.google.common.collect.ImmutableList<android.content.Intent> getVoiceActivityIntents()
        Returns the list of Intent instances passed into VoiceInteractionSession.startVoiceActivity(Intent) in invocation order.
      • isWindowShowing

        public boolean isWindowShowing()
        Returns whether the UI window from VoiceInteractionSession is currently showing.
      • isUiEnabled

        public boolean isUiEnabled()
        Returns whether the UI is set to be enabled through VoiceInteractionSession.setUiEnabled(boolean).
      • isFinishing

        public boolean isFinishing()
        Returns whether the VoiceInteractionSession is in the process of being destroyed and finishing.
      • setStartVoiceActivityException

        public void setStartVoiceActivityException​(java.lang.RuntimeException exception)
        Sets a RuntimeException that should be thrown when VoiceInteractionSession.startVoiceActivity(Intent) is invoked.