Search in sources :

Example 1 with AskForPermissionsConsentCard

use of com.amazon.speech.ui.AskForPermissionsConsentCard in project amos-ss17-alexa by c-i-ber.

the class BankContactService method getPermissionsResponse.

/**
 * Creates a {@code SpeechletResponse} for permission requests.
 *
 * @return SpeechletResponse spoken and visual response for the given intent
 */
private SpeechletResponse getPermissionsResponse() {
    String speechText = "Dieser Skill hat keine Berechtigung auf deine Adresse " + "Gib bitte diesem Skill die Berechtigung auf deine Adresse zu zugreifen";
    AskForPermissionsConsentCard card = new AskForPermissionsConsentCard();
    card.setTitle(BANK_CONTACT_CARD);
    Set<String> permissions = new HashSet<>();
    permissions.add(ALL_ADDRESS_PERMISSION);
    card.setPermissions(permissions);
    PlainTextOutputSpeech speech = getPlainTextOutputSpeech(speechText);
    return SpeechletResponse.newTellResponse(speech, card);
}
Also used : PlainTextOutputSpeech(com.amazon.speech.ui.PlainTextOutputSpeech) AskForPermissionsConsentCard(com.amazon.speech.ui.AskForPermissionsConsentCard)

Aggregations

AskForPermissionsConsentCard (com.amazon.speech.ui.AskForPermissionsConsentCard)1 PlainTextOutputSpeech (com.amazon.speech.ui.PlainTextOutputSpeech)1