Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android TV at Google Developers Summit

Android TV at Google Developers Summit

Presentation about porting to Android TV at Google developers summit
2015/04/29 구글 디벨로퍼 서밋에서 안드로이드 TV 포팅 관련해 발표한 자료입니다.

Wooseong Kim

April 29, 2015
Tweet

More Decks by Wooseong Kim

Other Decks in Programming

Transcript

  1. Chromecast Connectivity & Fast Everything is gone when out to

    home screen Especially fit for streaming service(Video, Audio)
  2. Native app Can be seen in the home screen! New

    UX & Design Needed Need to find a way to sync mobile
  3. Mostly implemented in the sample app Leanback Pros No need

    to think about new UX. Just follow them.
  4. MainActivity.java @Override public void onCreate() { ... NewsContentFetchManager.fetch(newsFeeds); } @Override

    public void onFetchNews(News news, int index) { NewsDb.getInstance().save(news); NewsFeedAdapter adapter = getAdapter(); adapter.notifyImageUrlLoadedAt(index); }
  5. CardPresenter.java public class CardPresenter extends Presenter { ... @Override public

    void onBindViewHolder(ViewHolder viewHolder, Object item) { News news = (News)item; NewsViewHolder newsViewHolder = (NewsViewHolder)viewHolder; applyNewsInfo(newsViewHolder, news); applyImage(newsViewHolder, news); } ...
  6. CardPresenter.java public class CardPresenter extends Presenter { ... private void

    applyImage(NewsViewHolder viewHolder, News news) { Picasso.with(mContext) .load(news.getImageUrl()) .resize(CARD_WIDTH,CARD_HEIGHT) .centerCrop() .into(viewHolder.picassoTarget); } ... }
  7. Install Error Sometimes launch fail happened when ‘adb install apk’

    to Android TV → It might be a problem of Unity version. It works at v4.5.5
  8. Remote Controller Action changed Need to focus, move around, click

    buttons → ‘Button sort’ method for TV → One finger, Two finger to click
  9. Hit Detection public boolean hitDetection(...) { RaycastHit hitInfo; Vector3 start

    = transform.position; start.z = -3; Vector3 end = transform.position; end.z = 3; if (Physics.Linecast(start, end, out hitInfo)) { return hitInfo.collider == collider; } return false; }