Android TV: Best Practices for Engaging Apps (Android Dev Summit '19)

IPTVGreekcom είναι ένας από τους καλύτερους παρόχους IPTV iptvgreek.com/iptv-service/ στον κόσμο. IPTV με περισσότερα από 79.00 κανάλια από 43 χώρες και 9800 VOD με πολλές ...

 

My name is Casio I am a developer relations here at Google I get the job done generally with Android Tv set and currently we're going to speak about very best techniques for engaging apps which is style of like and gay embraces a great deal of things it's sort of a generic title so to

narrow it down Here is the things that We'll discuss I will start off by expressing a little bit of the point out of household and living room as we realize right here Google then I'll shift to look at some Android Television set Fundamentals which a lot of massive big

apps to missus and and and has some blunders in there and no partaking application And that i acquired fantastic a terrific participating application start of finding the entire Fundamental principles appropriate then we are moving to talk a little bit concerning the linkback library and one of many key questions that

Everyone always has that is how do I customize the Leanback library it will not in shape always the what I want specifically can I regulate it may I personalize it spoiler warn the answer is mostly Sure and we're going to talk a little bit about that and after that I am likely

to look at the OS integration they're going to discuss how we can easily combine with Android TVs homescreen to attribute our articles we are going to look at discoverability by means of research and interesting With all the assistance so starting with a state of property and living room for us at

Google so technologies has adjusted how we connect with the home here at Google we think that the next wave another step forward in technology for the house will originate from the intersection of hardware application and artificial intelligence a single your private home to not just be smarter using your

household not merely really should be extra useful but we all we want are your home to give you the results you want and bringing together hardware software program and synthetic intelligence to offer an incredible Spurs to our customers and this certainly is anchored by the Google assistant the helpful Google technique that

delivers jointly research that brings together media and each of the media factors and all the media contact details at Google and if we are referring to media there isn't a greater spot to take in media and to observe media than the bigger screen your house Therefore the Android Television set is

at the guts with the media while in the Google assistant energy in your house you can have your smart mobile phone your good vehicle your Smart speakers and also the Android Television set brings anything together in a single spot media game titles audio and all of those working experience collectively into one particular significant display as part of your

living room Android TV found loads of momentum lately six outside of the highest six away from ten prime Good TV manufactures are shipping TVs with Android TV and in excess of a hundred and forty shell out Television set operators are shippi setup boxes with android Tv set too this has

been a tremendous enhance in the last several years which great momentum that we are viewing on Android Television extends to builders in addition we not too long ago declared that We've now about five,000 applications on Google Engage in for Android Television in excess of a thousand of these remaining for from steaming

streaming written content suppliers so there is a ton going on Android TV and at Google we're concentrating a great deal of efforts in Android Tv set so let us discuss a terrific producing fantastic partaking Android TV applications so to get rolling what tends to make an entry Television app or an Android application

and Android Television app on account of system remaining Android suggests you can reuse all of your techniques being an Android developer to generate an Android Television application but what makes it a TV app well get started with the basics It's important to declare your capabilities and I understand this

is admittedly fundamental but I would like you to definitely genuine to touch on this for the reason that as I discussed There are tons of huge apps that skips or misses some of these Principles and no good participating application will work for those who skip the fundamentals so certainly the primary feature that

you need to declare is you Really don't hit my contact display screen because the final time I checked individuals don't go and touching their dwelling display TVs their lounge TV so if the detail their fingers are interact utilizing a remote control also You should declare that you

use linkback this does not essentially consult with the url back library url back again is this generic term that we use to outline this encounter of observing Television which is different from utilizing a mobile machine as you're making use of it at a distance within a link back placement inside a connection

back again predicament so You should declare that upcoming You must declare your software banner just level I'm going to speak a little bit more about fashion which happens to be something that we usually have problems with And eventually You should declare your Android Tv set intent which is not

the primary tent therefore you declare your Leanback launcher so Poona you're putting out collectively you declare the characteristics you use you declare the banner therefore you declare your url again in intent a single two three your options your banner inside our connection back again intent but I wish to

converse additional a bit more about the app banner itself that is the banner for those who ever utilised Android TV you know how it appears but Here is the factor in many numerous predicaments you may perhaps seem Erroneous and in many applications we've seen hunting Improper one among these examples is

after you provide a mobile icon below Android Television set application what happens is that the icon will be scaled and put Within the dark rectangle so it looks like this Unusual combination of a sq. icon within a rectangle location this occurs whenever you provide a cell icon 512 by

512 in your adorable xhdpi folder so that's Improper tend not to try this also should you supply any banner There may be greater than 300 320 by a hundred and eighty does not make a difference wherein folder you place it it is not heading to appear the right way this isn't in this instance We've a 9

and sixteen by 540 pixel impression in The remainder drawable folder it will not do the job if you put in a special spot so here I have the same image place inside the drawable way Television DPI also does not seem accurately once again the way to make it happen is precisely 300 320 by

a hundred and eighty pixels in The remainder drawable xhdpi folder this way your banner appears to be the right way and remembering that our banner is used to ask your app representation but It is also utilised in other places like such as within the simple x roll so possibly nailing it down accurately is very important eventually if

you wish your application to become released for during the Play Store for Android Television set There exists a Exclusive opt-in distribution that you have to examine if you do not do this it isn't really intending to go with the Play Shop so inside your Participate in console It's important to uncover

this distributor app on Android TV it is not adequate to show it's actually not sufficient to point out you have a link back again launcher you even have to seek out this distributor on Television set and check that box and The key reason why for that may be that there are a lot of plant quite a few hybrid platforms

or multi-platform natural environment progress environments that routinely states that every thing is enabled like a Leanback launcher by way of example but you could possibly hardly ever have in fact analyzed none on Television through the use of these these advancement ecosystem so that does not automatically signify it may operate appropriately on a Tv set so This is exactly why

we requested you to check that precisely checkbox fantastic to ensure that that they are the basic principles they are the very bare-bones that you've to nail let us discuss the Leanback library now certainly the linkback library is this this list of widgets significant stage widgets that we provide

they confirm for the materialized specs and they offer a terrific working experience for making use of TV at a distance We now have widgets for the house screen which incorporates by way of example rows and a navigation drawer we have widgets for information aspects we have widgets for your good deal of various predicaments but

one of the most Regular query that we listen to with regards to the Leanback library is properly the widgets that you just provide doesn't in good shape a hundred percent what you'll need so are there any solutions to customise the Leanback library effectively the answer is Of course there are actually mainly two methods you are able to go about

customizing the Leanback library sorry you could just just alter the colors and Proportions values inside your application otherwise you can offer tailor made presenters so let's converse a little bit about colours and Proportions if we go specially if we look specially for the Search fragment which happens to be the 1

that may be employed for lots of homescreen from home monitor of principal apps which is the one that demonstrates up sidebar navigation as well as the rows of contents you will find like Nearly twenty Attributes only in regards to the Look through fragment that you could modify in your callers and internal Proportions values things like

brown like padding like title stereos roll variations and these applies also for the navigation tower to each of the person playing cards and the like up to now so for example can I Repeated issue am i able to make my navigation drawer shorter Indeed you'll be able to you don't need to publish code

for that just by modifying the Marg's along with the margin pennies and various Proportions you can do that Of course we need to do a better job at documenting these Attributes in some cases they don't seem to be necessarily effortless to seek out Nevertheless they exist and you may go a great distance just by

modifying the value of those Attributes now in some instances that's not more than enough And so the linkback library It really is determined by MVP or Product Perspective sample which is amongst the several mV no matter what parents and a lot of of People widgets they let you provide a tailor made presenter I am not

going to dwell into the details about what helps make what is the distinction between MVP or MVC or mvvm but The truth is that on MVP your presenter acts since the glue between the product as well as the perspective but it's also to blame for initiating or inflating in Android language the look at

which means that by giving a custom presenter you might be basically in total control of what you would like it to seem like what you would like that widget to seem like since you can offer a personalized perspective so let's take a look at an illustration again I will make use of the

Look through fragment mainly because it's the one which's largely employed as the most crucial monitor of apps the Browse fragment it includes and it expects an array object adapter for genuine demonstrate the person record rows and the individual list rows a person's a header peak and also a write-up adapter etc and so on but

I will focus on the higher ident presenter which happens to be the one that we could use to customize how the navigation drummer appears so for example say I would like to obtain my navigation drawer and I choose to display icons near to my textual content close to my titles effectively

what you can do in this code is in Java what you are able to do is offer your personalized presenter In this instance I am calling it the icon header product presenter extending dwelling header presenter and you've got two of the best a few unique procedures at bare bare minimum 3 distinct functions

on create perspective holder on bind discipline holder and own unbind see holder on build see holder listed here inflate your format and all over again because that is a presenter you inflate layout if inside the presenter you're in finish Charge of offering any see that you would like on Chunk view

holder you established the contents not to mention on bite you totally free the assets so let us take a look suppose I would like To do that icons I'm able to do that by offering a customized look at by making use of a linear layout and which include not just a text watch which can be the

default but additionally a picture view then on by look at holder once more an instance of your watch holder presenter and the header item by getting the hider merchandise I am able to connect with Houses for instance get identify and use Individuals to fill my textual content see label and icon not to mention

on you override very own unbind check out holder to absolutely free any means that you have utilised these are definitely the a few least kinds that you have to overwrite but certainly you will discover Some others If you prefer for instance to customise how they really feel how they look how the individual merchandise search

after they're selected you can find a single system that you can you can override for that again in black in again as part of your action it is possible to established the header presenter selector by supplying an instance of your respective customized presenter in my circumstance I am unable to have their product presenter This really is an previous

example but why Never you use it either way mainly because it's not quite nicely-recognized and It really is all over again a quite common question good let us now take a look at Oprah OS integration you can find 4 important things which your app needs to do to correctly integrate of the Android Television set operational technique and

present an engaging working experience integrative lookup media playback controls as activated through the assistant and of course the home monitor integration to play up coming and custom channels let us Have a look at Just about every of one of those so media found why very well as it lets the customers to find out information

by invoking playback from queries by voice perfectly how do you do it you make our app searchable by utilizing a information provider when the assistant performs query on the information provider it could start enjoying again applying intents let's Look into this sample code listed here nearer so

I'm generating my very own research execute a content company extending material provider these examples are in cuddling I have a create the query operate and I have to return a cursor just how I will do the lookup effectively that for ice you are able to do the research anyplace you

want you could check for neighborhood content that You may have downloaded in the application you can perform queries on the server regardless of what you need to do at the end you come a matrix cursor and their process to Screen your search engine results in just almost every other search engine results now the detail is

even though you wish you can do this research on the provide you would like to do it you wish to get it done quick for the reason that Google will their method will clearly show an Ender android Television set will display you will find the outcomes as they appear Therefore if the entire other apps are

more rapidly than yours all in their icons all in their banners will seem very first than yours and that means you need to make it more quickly upcoming media controls why properly since you wish to allow the consumer to control playback by using voice How does one do it you combine media sections

media periods to manage the callbacks so whenever you make use of the user utilizes their distant to do playback to your playback feedback things like Engage in or pause or perhaps smarter kinds like skip to the former channel or to skip to previous episodes or skip to up coming that may be

employed by each movie and audio apps you can even do a thumbs up If you prefer and that is a lesser-regarded feature and how you do this again you supply your media session fallback by extending meters require a session compact callback and you can overwrite these

features Never Engage in on pause on cease on six you on skip to future on skip to previews and by Handle override these controls and Regulate your personal player and by supplying this callback in your media session instance your app now responds for the assistant playback controls

now we're going to transfer to discuss the integrations with the Android TVs house screen The main a single bling currently being the Perform subsequent row mmm so if you don't know the Android TV interface It truly is made of these rows the main row can be a row in the

consumer favorites the users beloved applications as well as the incredibly very first row once the listing of the consumers apps could be the Perform future function and it is a function or a channel as we simply call it that aims to become this global space for that consumers articles throughout distinct apps so

The theory here is that any any articles the person is fascinated on or perhaps the person interacted with but did not finished your application can force this articles on the plain X row so why you keep your viewers engaged with material and fight curiosity or interesting or have not concluded

watching such as favored movies or following episodes of a series or a Motion picture that he hasn't concluded how do you do this nicely you publish your enjoy subsequent system to Android access preview channel helper you don't need to boot or be worried about your information service provider your self and what

could it be effectively the Android CBS Engage in following row is up to date to reflect the latest engagement and put pertinent content in the viewers fingertips s contents are added older contents transfer to the best and sooner or later in the consumer in no way interacts with these other contents They're faraway from

the from their Engage in next job once again let's Look into this code a little bit nearer so Android X's observe the next plan for what follows the Builder sample so make a builder you established the watch upcoming style you established a sort which might be a Film

or simply a sequence or songs Then you definitely deliver your title and outline plus your poster art URI It is also crucial to established the final time of engagement since this picture could be slightly much too much too also smaller but for those