/**@class android.service.voice.VoiceInteractionService @extends android.app.Service Top-level service of the current global voice interactor, which is providing support for hotwording, the back-end of a {@link android.app.VoiceInteractor}, etc. The current VoiceInteractionService that has been selected by the user is kept always running by the system, to allow it to do things like listen for hotwords in the background to instigate voice interactions. <p>Because this service is always running, it should be kept as lightweight as possible. Heavy-weight operations (including showing UI) should be implemented in the associated {@link android.service.voice.VoiceInteractionSessionService} when an actual voice interaction is taking place, and that service should run in a separate process from this one. */ var VoiceInteractionService = { /** The {@link Intent} that must be declared as handled by the service. To be supported, the service must also require the {@link android.Manifest.permission#BIND_VOICE_INTERACTION} permission so that other applications can not abuse it. */ SERVICE_INTERFACE : "android.service.voice.VoiceInteractionService", /** Name under which a VoiceInteractionService component publishes information about itself. This meta-data should reference an XML resource containing a <code><{@link android.R.styleable#VoiceInteractionService voice-interaction-service}></code> tag. */ SERVICE_META_DATA : "android.voice_interaction", /**Called when a user has activated an affordance to launch voice assist from the Keyguard. <p>This method will only be called if the VoiceInteractionService has set {@link android.R.attr#supportsLaunchVoiceAssistFromKeyguard} and the Keyguard is showing.</p> <p>A valid implementation must start a new activity that should use {@link android.view.WindowManager.LayoutParams#FLAG_SHOW_WHEN_LOCKED} to display on top of the lock screen.</p> */ onLaunchVoiceAssistFromKeyguard : function( ) {}, /**Check whether the given service component is the currently active VoiceInteractionService. */ isActiveService : function( ) {}, /**Set contextual options you would always like to have disabled when a session is shown. The flags may be any combination of {@link android.service.voice.VoiceInteractionSession#SHOW_WITH_ASSIST android.service.voice.VoiceInteractionSession.SHOW_WITH_ASSIST} and {@link android.service.voice.VoiceInteractionSession#SHOW_WITH_SCREENSHOT android.service.voice.VoiceInteractionSession.SHOW_WITH_SCREENSHOT}. */ setDisabledShowContext : function( ) {}, /**Return the value set by {@link #setDisabledShowContext}. */ getDisabledShowContext : function( ) {}, /**Request that the associated {@link android.service.voice.VoiceInteractionSession} be shown to the user, starting it if necessary. @param {Object {Bundle}} args Arbitrary arguments that will be propagated to the session. @param {Number} flags Indicates additional optional behavior that should be performed. May be any combination of {@link VoiceInteractionSession#SHOW_WITH_ASSIST VoiceInteractionSession.SHOW_WITH_ASSIST} and {@link VoiceInteractionSession#SHOW_WITH_SCREENSHOT VoiceInteractionSession.SHOW_WITH_SCREENSHOT} to request that the system generate and deliver assist data on the current foreground app as part of showing the session UI. */ showSession : function( ) {}, /**Request to query for what extended voice actions this service supports. This method will be called when the system checks the supported actions of this {@link android.service.voice.VoiceInteractionService}. Supported actions may be delivered to {@link android.service.voice.VoiceInteractionSession} later to request a session to perform an action. <p>Voice actions are defined in support libraries and could vary based on platform context. For example, car related voice actions will be defined in car support libraries. @param {Object {java.util.Set}} voiceActions A set of checked voice actions. @return {Object {java.util.Set}} Returns a subset of checked voice actions. Additional voice actions in the returned set will be ignored. Returns empty set if no actions are supported. */ onGetSupportedVoiceActions : function( ) {}, /** */ onBind : function( ) {}, /**Called during service initialization to tell you when the system is ready to receive interaction from it. You should generally do initialization here rather than in {@link #onCreate}. Methods such as {@link #showSession} and {@link #createAlwaysOnHotwordDetector} will not be operational until this point. */ onReady : function( ) {}, /**Called during service de-initialization to tell you when the system is shutting the service down. At this point this service may no longer be the active {@link android.service.voice.VoiceInteractionService}. */ onShutdown : function( ) {}, /**Creates an {@link android.service.voice.AlwaysOnHotwordDetector} for the given keyphrase and locale. This instance must be retained and used by the client. Calling this a second time invalidates the previously created hotword detector which can no longer be used to manage recognition. @param {String} keyphrase The keyphrase that's being used, for example "Hello Android". @param {Object {Locale}} locale The locale for which the enrollment needs to be performed. @param {Object {AlwaysOnHotwordDetector.Callback}} callback The callback to notify of detection events. @return {Object {android.service.voice.AlwaysOnHotwordDetector}} An always-on hotword detector for the given keyphrase and locale. */ createAlwaysOnHotwordDetector : function( ) {}, /**Checks if a given keyphrase and locale are supported to create an {@link android.service.voice.AlwaysOnHotwordDetector}. @return {Boolean} true if the keyphrase and locale combination is supported, false otherwise. @hide */ isKeyphraseAndLocaleSupportedForHotword : function( ) {}, /**Provide hints to be reflected in the system UI. @param {Object {Bundle}} hints Arguments used to show UI. */ setUiHints : function( ) {}, };