Save 37% off PRO during our Black Friday Sale! »

Android TV development

Android TV development

Talk from Riga Dev Day 2015


David Vávra

January 27, 2015


  1. Introduction to Android TV development David Vávra, Avast Mobile

  2. Computer- phone-like UI Remote control with 60+ buttons Fragmented developer

  3. Leanback content-focused UI Game controller or a phone Unified developer

  4. Demo time

  5. Hardware Nexus Player available in Google Play in US and

    Canada. Price: $99 Intel Atom 1.8Ghz Quad-core with graphics, 1 GB RAM, 8 GB flash All 2015 4K and smart TV models. All 2015 Philips TV models. All 2015 UB and UH series models. Razer Forge TV - gaming console, Snapdragon quad-core 2.5Ghz + Ardeno GPU, available in Q1 2015 for $99, 4 controllers, “lapboard”
  6. Design

  7. Creative vision Casual Consumption Cinematic Experience Simplicity

  8. Navigation

  9. Content organization compile “” Android Studio → New Project →

    TV → Android TV Activity
  10. None
  11. None
  12. None
  13. None
  14. Overscan <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/base_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:layout_marginTop="27dp"

    android:layout_marginLeft="48dp" android:layout_marginRight="48dp" android:layout_marginBottom="27dp" > </LinearLayout>
  15. Development

  16. Basics Full Android Lollipop Emulator Hardware-limited (GPS, telephony,...) <manifest package="cz.destil.moodsync">

    <uses-feature android:name="" android:required="false" /> <uses-feature android:name="android.hardware.touchscreen" android:required="false" /> <application android:banner="@drawable/banner" android:theme="@style/Theme.Leanback"> <activity android:name=".activity.MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category. LEANBACK_LAUNCHER"/> </intent-filter> </activity> </application> </manifest>
  17. Recommendations Android notifications (category, local, ongoing) Periodically launch service to

    generate Don’t forget to remove them
  18. Search ContentProvider with defined columns ◦ TEXT, CONTENT_TYPE, PRODUCTION_YEAR required

    searchable.xml defining the search & Intents
  19. Controllers 4 directions, SELECT, BACK, HOME @Override public boolean dispatchGenericMotionEvent(MotionEvent

    ev) @Override public boolean dispatchKeyEvent(KeyEvent event) Multiple controllers android:configChanges="keyboard|keyboardHidden|navigation" <uses-feature android:name="android.hardware.gamepad"/>
  20. Games Landscape, shared Overscan android:isGame="true" Play Game Services

  21. How did I do MoodSync? Media Projection API Palette

  22. Avast Mobile is hiring

  23. Q & A +David Vávra @destil