Setup Instructions

Dependencies

This project has the following dependencies, some of which require manual setup. If you would like to use a version of the SDK which has no manual setup, consider using the lite version of the SDK.

This project has the following dependencies.

Steps

  1. Clone repository (or download & unzip)
  2. Set up the submodules by running the following commands in Terminal
    • git submodule init
    • git submodule update
  3. Open Eclipse
  4. Click File > Import
  5. Select Existing Android Code Into Workspace and click Next
  6. Browse to the Connect-SDK-Android project folder and click Open
  7. Check all projects and click Finish
  8. Follow the setup instructions for each of the service submodules
  9. Right-click the Connect-SDK-Android-Core project and select Properties, in the Library pane of the Android tab add
    • Connect-SDK-Android
  10. Right-click the Connect-SDK-Android-Google-Cast project and select Properties, in the Librarypane of the Android tab add following libraries
    • Connect-SDK-Android-Core
    • android-support-v7-appcompat
    • android-support-v7-mediarouter
    • google-play-services_lib
  11. IN YOUR PROJECT select Properties, in the Library pane of the Android tab add following libraries
    • Connect-SDK-Android-Core
    • Connect-SDK-Android-Google-Cast
  12. Set up your manifest file as per the instructions below

If these steps are failing, try checking the repository for the latest setup instructions.

Permissions to include in manifest

  • Required for SSDP & Chromecast/Zeroconf discovery
    • android.permission.INTERNET
    • android.permission.CHANGE_WIFI_MULTICAST_STATE
  • Required for interacting with devices
    • android.permission.ACCESS_NETWORK_STATE
    • android.permission.ACCESS_WIFI_STATE
  • Required for storing device pairing information
    • android.permission.WRITE_EXTERNAL_STORAGE
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Metadata for application tag

This metadata tag is necessary to enable Chromecast support.

<application ... >
    ...

    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />

</application>