/** * Helper method that retrieves the system state from the request context. * @param context request context. * @return SystemState the systemState */ private SystemState getSystemState(Context context) { return context.getState(SystemInterface.class, SystemState.class); } }
/** * Helper method that retrieves the system state from the request context. * @param context request context. * @return SystemState the systemState */ private SystemState getSystemState(Context context) { return context.getState(SystemInterface.class, SystemState.class); }
private String getDisplayStateToken(SpeechletRequestEnvelope envelope) { DisplayState state = envelope.getContext().getState(DisplayInterface.class, DisplayState.class); String stateToken = ""; if (state != null) { stateToken = state.getToken(); } return stateToken; } }
private String getDisplayStateToken(SpeechletRequestEnvelope envelope) { DisplayState state = envelope.getContext().getState(DisplayInterface.class, DisplayState.class); String stateToken = ""; if (state != null) { stateToken = state.getToken(); } return stateToken; } }
public SpeechletResponse dispatchRequest(SpeechletRequestEnvelope envelope) { SystemState system = envelope.getContext().getState(SystemInterface.class, SystemState.class); boolean hasDisplay = system.getDevice().getSupportedInterfaces().isInterfaceSupported(DisplayInterface.class);
public SpeechletResponse dispatchRequest(SpeechletRequestEnvelope envelope) { SystemState system = envelope.getContext().getState(SystemInterface.class, SystemState.class); boolean hasDisplay = system.getDevice().getSupportedInterfaces().isInterfaceSupported(DisplayInterface.class);