macOS Quick Start Guide

The following instructions show you how to set up the Alexa Smart Screen SDK on a computer running macOS. The instructions will guide you through obtaining the SDK, installing and building the SDK, and running the included sample app.

macOS prerequisites

  • macOS High Sierra or Mojave
  • AVS Device SDK v1.15
  • Python (minimum version 2.7.x)
  • Homebrew
  • XCode command line tools

To determine your installed versions, type the following commands.

python -V
brew --version
xcode-select --version

Procedure overview

The following steps show the procedure that you must follow to obtain, install, and build the Alexa Voice Service (AVS) Device SDK and the Alexa Smart Screen SDK to get the Smart Screen SDK sample app up and running on your macOS computer. If you previously installed and ran the AVS Device SDK v1.15, you can skip steps 1-5.

Step 1: Create an AVS device on the Amazon developer portal

Before you can use both the AVS Device SDK sample app and the Alexa Smart Screen SDK sample app, you must have a test device registered as a placeholder on the Amazon developer portal.

Follow the instructions to register an AVS device and create a security profile for the AVS Device SDK, which generates a certificate that you can use with the AVS Device SDK and Alexa Smart Screen SDK sample apps.

Make sure that you download and save the config.json file for later use.

Step 2: Set up your development environment on your Mac

When you set up your development environment, you need to create a directory structure for the SDKs and dependencies. This page uses sdk_folder as the parent folder, while the AVS Device SDK instructions use my_project as the parent folder.

To set up your development environment on your Mac

  1. Enter the following commands to create the required directories.
    cd ~
    mkdir sdk_folder
    cd sdk_folder
    mkdir sdk-build third-party sdk-install db
  2. Install and configure curl-openssl:

    brew install curl-openssl

    If successful, you should see something similar to the following output as curl-openssl is installed.

    ==> Downloading https://homebrew.bintray.com/bottles/curl-openssl-7.66.0.mojave.bottle.tar.gz
    Already downloaded: /Users/userid/Library/Caches/Homebrew/downloads/d1759c9021d53e9cb5f5b21d7fec34e53f5468217a09760b70fd26d024742c1a--curl-openssl-7.66.0.mojave.bottle.tar.gz
    ==> Pouring curl-openssl-7.66.0.mojave.bottle.tar.gz
    ==> Caveats
    because macOS already provides this software and installing another version in
    parallel can cause all kinds of trouble.
    
    If you need to have curl-openssl first in your PATH run:
      echo 'export PATH="/usr/local/opt/curl-openssl/bin:$PATH"' >> ~/.bash_profile
    
    For compilers to find curl-openssl you may need to set:
      export LDFLAGS="-L/usr/local/opt/curl-openssl/lib"
      export CPPFLAGS="-I/usr/local/opt/curl-openssl/include"
    
    For pkg-config to find curl-openssl you may need to set:
      export PKG_CONFIG_PATH="/usr/local/opt/curl-openssl/lib/pkgconfig"
    
    ==> Summary
    🍺  /usr/local/Cellar/curl-openssl/7.66.0: 454 files, 3.4MB
  3. Add the path for curl-openssl to your .bash_profile.

    echo export PATH="/usr/local/opt/curl-openssl/bin:$PATH" >> ~/.bash_profile
  4. Enter the following commands to install the SDK dependencies.

    brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-libav sqlite3 repo cmake clang-format doxygen wget git

    As each dependency installs, your command line interface (CLI) displays a status message with confirmation that the installation was successful.

  5. Download and build portaudio.

    a. Navigate to the third-party directory.

    cd third-party

    b. Download portaudio.

    wget -c http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz

    Your CLI should display output similar to the following example when successful.

       --2019-10-22 12:02:02--  http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz
       Resolving www.portaudio.com (www.portaudio.com)... 107.22.210.58
       Connecting to www.portaudio.com (www.portaudio.com)|107.22.210.58|:80... connected.
       HTTP request sent, awaiting response... 200 OK
       Saving to: ‘pa_stable_v190600_20161030.tgz’
    
       pa_stable_v190600_20161030.tgz    100%[===========================================================>]   1.38M  2.49MB/s    in 0.6s    
    
       2019-10-22 12:02:03 (2.49 MB/s) - ‘pa_stable_v190600_20161030.tgz’ saved [1450572/1450572]

    c. Extract the TGZ file.

    tar xf pa_stable_v190600_20161030.tgz

    d. Configure portaudio:

       cd portaudio
       ./configure --disable-mac-universal && make

    Your CLI should display many lines of status updates as it configures portaudio.

  6. Set your PKG_CONFIG_PATH.

    a. Determine the path on your Mac.

    brew info openssl

    You should see something similar to the following example as your command output.

       SSL/TLS cryptography library
       https://openssl.org/
       /usr/local/Cellar/openssl/1.0.2t (1,787 files, 12.0MB)
         Built from source on 2019-10-01 at 10:59:16
       ==> Caveats
       keychain. To add additional certificates (e.g. the certificates added in
       the System keychain), place .pem files in
         /usr/local/etc/openssl/certs
    
       and run
         /usr/local/opt/openssl/bin/c_rehash
    
       openssl is keg-only, which means it was not symlinked into /usr/local,
       because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
    
       If you need to have openssl first in your PATH run:
         echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
    
       For compilers to find openssl you may need to set:
         export LDFLAGS="-L/usr/local/opt/openssl/lib"
         export CPPFLAGS="-I/usr/local/opt/openssl/include"
    
       For pkg-config to find openssl you may need to set:
         export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
    
       ==> Analytics
       install: 241,350 (30 days), 1,009,469 (90 days), 6,078,549 (365 days)
       install_on_request: 82,017 (30 days), 184,444 (90 days), 872,262 (365 days)

    b. Update the PKG_CONFIG_PATH. Replace path-to-openssl in the following example with your own path to openssl. To obtain this path, copy the path in the previous output that looks similar to usr/local/Cellar/openssl/1.0.2r.

       echo export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig:/_path-to-openssl_/lib/pkgconfig:$PKG_CONFIG_PATH" >> ~/.bash_profile

Step 3: Download and configure the AVS Device SDK and Alexa Smart Screen SDK

  1. Clone the Git repository for the AVS Device SDK v1.15.

     cd ~/sdk_folder
     git clone --single-branch --branch v1.15 git://github.com/alexa/avs-device-sdk.git
  2. Clone the Git repository for version 1.2 of the APL Core Library.

     cd ~/sdk_folder   
     git clone --single-branch --branch v1.2 git://github.com/alexa/apl-core-library.git
  3. Clone the Git repository for the Alexa Smart Screen SDK.

    cd ~/sdk_folder   
    git clone git://github.com/alexa/alexa-smart-screen-sdk.git

Step 4: Build the AVS Device SDK

Because the Alexa Smart Screen SDK has several dependencies on the AVS Device SDK, you need to build the AVS Device SDK and run the AVS Device SDK sample app before attempting to build and run the Alexa Smart Screen SDK and sample app.

To build the AVS Device SDK

  1. Create and enter a build folder for the AVS Device SDK.

    cd ~/sdk_folder
    mkdir sdk-build
    cd sdk-build
  2. Configure a cmake command for the AVS Device SDK.

     cmake ../avs-device-sdk \
    -DGSTREAMER_MEDIA_PLAYER=ON \
    -DCURL_LIBRARY=/usr/local/opt/curl-openssl/lib/libcurl.dylib \
    -DCURL_INCLUDE_DIR=/usr/local/opt/curl-openssl/include \
    -DPORTAUDIO=ON \
    -DPORTAUDIO_LIB_PATH=$HOME/sdk_folder/third-party/portaudio/lib/.libs/libportaudio.a \
    -DPORTAUDIO_INCLUDE_DIR=$HOME/sdk_folder/third-party/portaudio/include \
    -DCMAKE_BUILD_TYPE=DEBUG \
    -DCMAKE_INSTALL_PREFIX=$HOME/sdk_folder/sdk-install

    You should see output similar to the following truncated example if your cmake command is successful.

    Creating the build directory for the AlexaClientSDK with build type: DEBUG
    No keyword detector type specified, skipping build of keyword detector.
    Bluetooth implementation not supported
    CMake Warning (dev) at ThirdParty/googletest-release-1.8.0/CMakeLists.txt:3 (project):
      Policy CMP0048 is not set: project() command manages VERSION variables.
      Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
      command to set the policy and suppress this warning.
    
      The following variable(s) would be set to empty:
    
        PROJECT_VERSION
        PROJECT_VERSION_MAJOR
        PROJECT_VERSION_MINOR
    
        PROJECT_VERSION_PATCH
     This warning is for project developers.  Use -Wno-dev to suppress it.

     Bluetooth implementation not supported
     -- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
     -- Configuring done
     -- Generating done
     -- Build files have been written to: /Users/me/sdk_folder/sdk-build

    If you see messages about missing GTEST, ignore them, as this library doesn't cause errors with the SDK or sample app.

  3. Build the AVS Device SDK.

    make -j4

    The build process for the SDK takes several minutes. Your CLI will display a scrolling set of status messages to inform you of the build process similar to the following.

    ...
    Scanning dependencies of target SampleApp
    [ 98%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/ConsolePrinter.cpp.o
    [ 98%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/ConsoleReader.cpp.o
    [ 98%] Built target DoNotDisturbCapabilityAgentTest
    [ 98%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/GuiRenderer.cpp.o
    [ 99%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/InteractionManager.cpp.o
    [ 99%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/KeywordObserver.cpp.o
    [ 99%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/LocaleAssetsManager.cpp.o
    [ 99%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/UIManager.cpp.o
    [ 99%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/UserInputManager.cpp.o
    [100%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/SampleApplication.cpp.o
    [100%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/SampleEqualizerModeController.cpp.o
    [100%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/main.cpp.o
    [100%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/PortAudioMicrophoneWrapper.cpp.o
    [100%] Linking CXX executable SampleApp
    [100%] Built target SampleApp
  4. Install the AVS Device SDK.

    make install

    The installation also takes several minutes. As with the build process, your CLI window displays scrolling status messages, such as the following.

    [ 15%] Built target AVSCommon
    [ 16%] Built target gmock_main
    [ 16%] Built target gtest
    [ 17%] Built target gtest_main
    [ 17%] Built target AttachmentCommonTestLib
    [ 17%] Built target NamespaceAndNameTest
    [ 17%] Built target HandlerAndPolicyTest
    [ 17%] Built target AttachmentTest
    [ 17%] Built target AttachmentWriterTest
    [ 18%] Built target ExceptionEncounteredSenderTest
    [ 18%] Built target CapabilityAgentTest
    [ 19%] Built target AttachmentUtilsTest
    [ 19%] Built target AttachmentReaderTest
    [ 20%] Built target DialogUXStateAggregatorTest
  5. Generate the AlexaClientSDKConfig.json file to be used by the sample apps for the SDKs.

    a. Navigate to the AVS Device SDK install directory:

    cd ~/sdk_folder/avs-device-sdk/tools/Install

    b. Run the genConfig.sh configuration script. Replace path-to-config.json with the config.json file that you downloaded from your security profile earlier. Replace device-serial-number with the serial number for the test device that you registered on the Developer Profile that corresponds to the config.json file.

     bash genConfig.sh path-to-config.json \
     device-serial-number \
     $HOME/sdk_folder/db \
     $HOME/sdk_folder/avs-device-sdk \
     $HOME/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json

    The following example shows the output of a config.json file.

      bash genConfig.sh /Users/me/my_project/source/avs-device-sdk/tools/Install/config.json \
      > SDKTestProduct \
      > $HOME/sdk_folder/db \
      > $HOME/sdk_folder/avs-device-sdk \
      > $HOME/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json

    The CLI window displays confirmation that you successfully created the configuration file.

    Completed generation of config file: /Users/me/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json

Step 5: Run the AVS Device SDK sample app

To confirm that you have installed and configured everything correctly on your computer, run the AVS Device SDK, and then try a few test Alexa commands.

To run the AVS Device SDK

  1. Navigate to the SampleApp source folder.

    cd ~/sdk_folder/sdk-build/SampleApp/src
  2. Run the sample app.

    ./SampleApp $HOME/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json DEBUG9

    The first time that you run the sample app, the text output prompts you to enter a code to authorize the app.

To authorize the app

  1. In a web browser, go to amazon.com/us/code.
  2. Log in with your Amazon developer credentials.
  3. Enter the code shown in your sample app text output.

    The sample app running in your CLI window connects to Alexa and displays confirmation that the app is running.

   #    #     #  #####      #####  ######  #    #              
   # #   #     # #     #    #     # #     # #   #               
   #   #  #     # #          #       #     # #  #                
   #     # #     #  #####      #####  #     # ###                 
   #######  #   #        #          # #     # #  #                
   #     #   # #   #     #    #     # #     # #   #               
   #     #    #     #####      #####  ######  #    #              

   #####                                           #                      
   #     #   ##   #    # #####  #      ######      # #   #####  #####      
   #        #  #  ##  ## #    # #      #          #   #  #    # #    #     
   #####  #    # # ## # #    # #      #####     #     # #    # #    #     
   # ###### #    # #####  #      #         ####### #####  #####      
   #     # #    # #    # #      #      #         #     # #      #          
   #####  #    # #    # #      ###### ######    #     # #      #          

   SDK Version 1.15.0

You can now test out the sample app with the enabled mic on your Mac.

To test the sample app

  • To ask Alexa a question, press t + Enter. You don't need to include "Alexa" at the start of your question. For example, try, "What time is it?" or "How is the weather?"
  • To quit and exit the app, press q + Enter.

If the sample app doesn't work, see the Alexa Smart Screen SDK Troubleshooting Guide for troubleshooting tips.

Step 6: Build the APL Core Library

The Alexa Smart Screen SDK has two components: the APL Core Library and the SDK itself. You must to build both of these components before you can run the Smart Screen SDK sample app.

To learn more about the APL Core Library, see APL Core Library README.

To build the APL Core Library

  1. Navigate to the APL Core Library directory.

    cd ~/sdk_folder/apl-core-library
  2. Create and enter a build directory for the APL Core Library.

     mkdir build
     cd build
  3. Configure cmake.

    cmake ..

    The command should display the following output.

      CMake Warning (dev) in CMakeLists.txt:
      No project() command is present.  The top-level CMakeLists.txt file must
      contain a literal, direct call to the project() command.  Add a line of
      code such as
    
        project(ProjectName)
    
      near the top of the file, but after cmake_minimum_required().
    
      CMake is pretending there is a "project(Project)" command on the first
      line.
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    Using Clang
    Building documentation
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/me/sdk_folder/apl-core-library/build
  4. Build the APL Core Library.

    make

    Your CLI output displays the build status.

    [  6%] Built target enumgen
    [ 13%] Built target yoga
    [ 18%] Built target rapidjson-build
    [ 24%] Built target pegtl-build
    [100%] Built target apl

Step 7: Build the Alexa Smart Screen SDK

After building the APL Core Library, build the Alexa Smart Screen SDK itself. You must install a few additional dependencies for the Smart Screen SDK.

To build the SDK

  1. Download and install websocketpp.

    a. Navigate to your third-party directory.

    cd ~/sdk_folder/third-party

    b. Download and extract websocketpp.

    wget https://github.com/zaphoyd/websocketpp/archive/0.8.1.tar.gz -O websocketpp-0.8.1.tar.gz

    You should see the following text output.

       --2019-10-22 15:04:25--  https://github.com/zaphoyd/websocketpp/archive/0.8.1.tar.gz
       Resolving github.com (github.com)... 192.30.255.113
       HTTP request sent, awaiting response... 302 Found
       Location: https://codeload.github.com/zaphoyd/websocketpp/tar.gz/0.8.1 [following]
       --2019-10-22 15:04:26--  https://codeload.github.com/zaphoyd/websocketpp/tar.gz/0.8.1
       Resolving codeload.github.com (codeload.github.com)... 192.30.255.121
       Connecting to codeload.github.com (codeload.github.com)|192.30.255.121|:443... connected.
       HTTP request sent, awaiting response... 200 OK
       Length: unspecified [application/x-gzip]
       Saving to: ‘websocketpp-0.8.1.tar.gz’
    
       websocketpp-0.8.1.tar.gz                      [ <=>                                                                                  ] 683.07K  3.69MB/s    in 0.2s    
    
       2019-10-22 15:04:26 (3.69 MB/s) - ‘websocketpp-0.8.1.tar.gz’ saved [699468]

    c. Extract websocketpp.

    tar -xvzf websocketpp-0.8.1.tar.gz

    You should see output similar to the following truncated example in your CLI window.

       x websocketpp-0.8.1/
       x websocketpp-0.8.1/.gitattributes
       x websocketpp-0.8.1/.gitignore
       x websocketpp-0.8.1/.travis.yml
       x websocketpp-0.8.1/CMakeLists.txt
       x websocketpp-0.8.1/COPYING
       x websocketpp-0.8.1/Doxyfile
       x websocketpp-0.8.1/SConstruct
  2. Install ASIO.

    brew install asio
  3. If you have not previously installed NodeJS, install NodeJS.

    brew install node@8
  4. Create and navigate into a build folder for the Smart Screen SDK.

    cd ~/sdk_folder
    mkdir ss-build
    cd ss-build
  5. Configure cmake.

    cmake -DCMAKE_PREFIX_PATH=$HOME/sdk_folder/sdk-install \
    -DWEBSOCKETPP_INCLUDE_DIR=$HOME/sdk_folder/third-party/websocketpp-0.8.1 \
    -DDISABLE_WEBSOCKET_SSL=ON \
    -DGSTREAMER_MEDIA_PLAYER=ON \
    -DCMAKE_BUILD_TYPE=DEBUG \
    -DPORTAUDIO=ON -DPORTAUDIO_LIB_PATH=$HOME/sdk_folder/third-party/portaudio/lib/.libs/libportaudio.a \
    -DPORTAUDIO_INCLUDE_DIR=$HOME/sdk_folder/third-party/portaudio/include/ \
    -DAPL_CORE=ON \
    -DAPLCORE_INCLUDE_DIR=$HOME/sdk_folder/apl-core-library/aplcore/include \
    -DAPLCORE_LIB_DIR=$HOME/sdk_folder/apl-core-library/build/aplcore \
    -DYOGA_INCLUDE_DIR=$HOME/sdk_folder/apl-core-library/build/yoga-prefix/src/yoga \
    -DYOGA_LIB_DIR=$HOME/sdk_folder/apl-core-library/build/lib \
    ../Alexa-smart-screen-sdk

    The following example shows truncated output from cmake.

       No keyword detector type specified, skipping build of keyword detector.
    Bluetooth implementation not supported
    Creating the build directory for the CapabilityAgents with build type: DEBUG
    No keyword detector type specified, skipping build of keyword detector.
    Bluetooth implementation not supported
    -- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
    -- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
    Creating the build directory for the ApplicationUtilities with build type: DEBUG
    No keyword detector type specified, skipping build of keyword detector.
    Bluetooth implementation not supported
    Creating the build directory for the SmartScreenClient with build type: DEBUG

    WARNING: Target "SampleApp" requests linking to directory "/usr/local/Cellar/gst-plugins-base/1.16.1/lib".  Targets may link only to libraries.  CMake is dropping the item.
    WARNING: Target "SampleApp" requests linking to directory "/usr/local/Cellar/glib/2.62.1/lib".  Targets may link only to libraries.  CMake is dropping the item.
    WARNING: Target "SampleApp" requests linking to directory "/usr/local/opt/gettext/lib".  Targets may link only to libraries.  CMake is dropping the item.
    -- Generating done
    -- Build files have been written to: /Users/me/sdk_folder/ss-build
  6. Build the Smart Screen SDK.

    make

    Your screen output should look similar to the following example.

    [  5%] Built target AlexaPresentation
    [ 15%] Built target gmock_main
    [ 21%] Built target AlexaPresentationTest
    [ 26%] Built target SmartScreenTemplateRunTime
    [ 31%] Built target TemplateRuntimeTest
    [ 42%] Built target SmartScreenClient
    [100%] Built target SampleApp
    npm WARN gui@1.0.0 No repository field.
    npm WARN gui@1.0.0 license should be a valid SPDX license expression
    
    audited 6584 packages in 3.62s
    found 0 vulnerabilities
    
    > gui@1.0.0 build /Users/me/sdk_folder/Alexa-smart-screen-sdk/modules/GUI/js
    > npm run lint && webpack --config webpack.config.js "--output-path" "/Users/me/sdk_folder/ss-build/modules/GUI" "--define" "DISABLE_WEBSOCKET_SSL=true"
    
    
    > gui@1.0.0 lint /Users/me/sdk_folder/Alexa-smart-screen-sdk/modules/GUI/js
    > tslint --project tsconfig.json -c tslint.json 'src/**/*.ts' 'src/**/.tsx'
    
    Hash: 12462024bc3092060422
    Version: webpack 4.41.2
    Time: 13419ms
    Built at: 10/22/2019 3:30:20 PM
                                        Asset       Size  Chunks             Chunk Names
                              ../dist/app.d.ts   2.99 KiB          [emitted]  
       ../dist/components/buttonInterface.d.ts  285 bytes          [emitted]  
                  ../dist/components/home.d.ts  144 bytes          [emitted]  
            ../dist/components/nowplaying.d.ts  265 bytes          [emitted]  
    ../dist/components/serverSideRenderer.d.ts    1.5 KiB          [emitted]  
                      ../dist/environment.d.ts  103 bytes          [emitted]  
                  ../dist/lib/Environment.d.ts  248 bytes          [emitted]  
              ../dist/lib/NavigationEvent.d.ts  339 bytes          [emitted]  
       ../dist/lib/activity/ActivityEvent.d.ts  554 bytes          [emitted]  
     ../dist/lib/activity/ActivityTracker.d.ts   1.09 KiB          [emitted]  
                   ../dist/lib/avshelpers.d.ts   1.07 KiB          [emitted]  
                       ../dist/lib/client.d.ts    1.7 KiB          [emitted]  
          ../dist/lib/device/ExtraLargeTV.d.ts  217 bytes          [emitted]  
              ../dist/lib/device/LargeHub.d.ts  213 bytes          [emitted]  
             ../dist/lib/device/MediumHub.d.ts  214 bytes          [emitted]  
                ../dist/lib/device/device.d.ts  975 bytes          [emitted]  
            ../dist/lib/focus/ChannelName.d.ts  343 bytes          [emitted]  
           ../dist/lib/focus/FocusManager.d.ts   2.06 KiB          [emitted]  
          ../dist/lib/focus/FocusResource.d.ts  296 bytes          [emitted]  
             ../dist/lib/focus/FocusState.d.ts  183 bytes          [emitted]  
       ../dist/lib/focus/IChannelObserver.d.ts  236 bytes          [emitted]  
           ../dist/lib/focus/IFocusBridge.d.ts  248 bytes          [emitted]  
         ../dist/lib/media/AVSAudioPlayer.d.ts   1.25 KiB          [emitted]  
               ../dist/lib/media/AVSVideo.d.ts   1.43 KiB          [emitted]  
                     ../dist/lib/messages.d.ts   3.22 KiB          [emitted]  
                       ../dist/lib/screen.d.ts  179 bytes          [emitted]  
              ../dist/lib/sdkLogTransport.d.ts  842 bytes          [emitted]  
                             ../dist/main.d.ts   21 bytes          [emitted]  
           ../dist/model/renderPlayerInfo.d.ts  976 bytes          [emitted]  
         20db d5eaf289a6e63cf91f8c05c37cf6.png   5.34 KiB          [emitted]  
                                    index.html  187 bytes          [emitted]  
                                main.bundle.js   4.18 MiB    main  [emitted]  main
    Entrypoint main = main.bundle.js
    [../../apl-client/index.js] /Users/me/sdk_folder/Alexa-smart-screen-sdk/modules/GUI/apl-client/index.js 490 KiB {main} [built]
    [../node_modules/css-loader/dist/cjs.js!./main.css] 4.46 KiB {main} [built]
    [./app.tsx] 13.5 KiB {main} [built]
    [./images/alexa.png] 82 bytes {main} [built]
    [./lib/NavigationEvent.ts] 648 bytes {main} [built]
    [./lib/activity/ActivityEvent.ts] 883 bytes {main} [built]
    [./lib/activity/ActivityTracker.ts] 2.1 KiB {main} [built]
    [./lib/avshelpers.ts] 2.26 KiB {main} [built]
    [./lib/client.ts] 3.45 KiB {main} [built]
    [./lib/device/device.ts] 2.26 KiB {main} [built]
    [./lib/focus/FocusManager.ts] 3.71 KiB {main} [built]
    [./lib/screen.ts] 529 bytes {main} [built]
    [./lib/sdkLogTransport.ts] 1.7 KiB {main} [built]
    [./main.tsx] 885 bytes {main} [built]
        + 33 hidden modules
    Child html-webpack-plugin for "index.html":
         1 asset
        Entrypoint undefined = index.html
           4 modules
    [100%] Built target GUIClient

Step 8: Run the Alexa Smart Screen SDK sample app

After you have successfully built the AVS Device SDK, APL Core Library, and Alexa Smart Screen SDK, you can run and experiment with the Alexa Smart Screen SDK sample app on your Mac.

To run the sample app

  1. Navigate into your Smart Screen SDK build folder.

    cd ~/sdk_folder/ss-build
  2. Run the sample app, making sure to point to the correct path where you generated your configuration file.

    ./modules/Alexa/SampleApp/src/SampleApp -C ~/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json -C ~/sdk_folder/sdk-build/Integration/SmartScreenSDKConfig.json -L INFO

    If you receive any error messages at this step, check the Alexa Smart Screen SDK Troubleshooting Guide, which addresses several common sample app execution errors for macOS. You can also try running the sample again, changing the verbosity level from INFO to DEBUG9.

    When the app successfully initializes and runs, your CLI window displays scrolling text output similar to the following truncated example.

    Running app with log level: DEBUG0
    2019-10-23 17:53:31.864 [  1] 0 ConfigurationNode:initializeSuccess
    2019-10-23 17:53:32.023 [  1] I LocaleAssetsManager:initialize:supportedWakeWords=NONE
    2019-10-23 17:53:32.033 [  6] I WebSocketServer:Listening for websocket connections:interface=127.0.0.1,port=8933
    2019-10-23 17:53:32.198 [  1] I Setting:handleSetValue:value=false
    2019-10-23 17:53:32.205 [  1] I Setting:handleSetValue:value="NONE"
    2019-10-23 17:53:32.206 [  1] I Setting:handleSetValue:value="NONE"
    2019-10-23 17:53:32.207 [  1] I Setting:handleSetValue:value="America/Vancouver"
    2019-10-23 17:53:32.209 [ 11] I LocaleAssetsManager:changeAssets:Locale=["en-US"],WakeWords=[]
    2019-10-23 17:53:32.219 [ 14] 0 MediaPlayer:handleSetObserverCalled:name=SystemSoundMediaPlayer
    2019-10-23 17:53:32.225 [ 17] 0 MediaPlayer:handleSetObserverCalled:name=SpeakMediaPlayer
    2019-10-23 17:53:32.232 [ 1a] 0 MediaPlayer:handleSetObserverCalled:name=AudioMediaPlayer
    2019-10-23 17:53:32.234 [  1] 0 SpeakerManager:mapCreated:numSpeakerVolume=6,numAlertsVolume=1
    2019-10-23 17:53:32.243 [ 1d] 0 MediaPlayer:handleSetObserverCalled:name=AlertsMediaPlayer
    2019-10-23 17:53:32.254 [ 20] 0 MediaPlayer:handleSetObserverCalled:name=NotificationsMediaPlayer
    2019-10-23 17:53:32.260 [  1] 0 ExternalMediaPlayer:createAdapters
    #################################################
    #       NOTIFICATION INDICATOR STATE: OFF       #
    #################################################
    ...
  3. To view and interact with Alexa in your web browser, navigate to ~/sdk_folder/ss-build/modules/GUI, and open the index.html file in a web browser.

    Your web browser displays the Alexa Smart Screen splash screen.

    AlexaSplashScreen
  4. Press and hold the A key on your keyboard to interact with Alexa. For example, with your mic and speakers enabled, press and hold the A key and ask, "What time is it?" (You do not need to preface your question with "Alexa.")

    Alexa responds with the current time.

  5. To try a question with a visual component, press and hold the A key and ask, "How is the weather?"

    Alexa recites and displays the current forecast.

    WeatherForecast
  6. Try to open an interactive skill, and interact with the skill not only verbally, but through your web browser. For example, press and hold the A key and ask, "Open Kayak."

    Alexa opens the Kayak skill in your web browser.

  7. To browse flights on Kayak, click or say "Search Flights"

  8. Try some of these other questions to explore various Alexa skills.

    • "Who is Jeff Bezos?"
    • "Tell me a joke."
    • "What does a Corgi look like?"
    • "Play Jeopardy."
    • "Open Food Network."
  9. To end the session, press Ctrl+C in your CLI window.

To learn more about the things that you can try with the Smart Screen SDK, see the Alexa Multi-Modal API Overview.

Modify the Smart Screen SDK configuration file for your device

For guidance on using the configuration file to define your device's visual capabilities, functionality, and supported server communication, see the Smart Screen SDK Config Specification.