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

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

 

My name is Casio I'm a developer relations below at Google I perform typically with Android Television and now we're going to talk about most effective practices for partaking apps that is style of like and gay embraces a lot of things It really is sort of a generic title so to

narrow it down Here is the things that We will speak about I'm going to start out by saying a little bit of the state of home and lounge as we understand in this article Google then I'm going to transfer to look at some Android Television Fundamental principles which many huge significant

applications to missus and and and has some problems in there and no participating app and I got excellent an incredible engaging app begin of finding every one of the Principles ideal then we're shifting to talk a little bit with regards to the linkback library and on the list of major inquiries that

everybody normally has which happens to be how can I customize the Leanback library it won't in good shape always the what I want accurately am i able to modify it may possibly I customise it spoiler notify The solution is mostly Of course and We will communicate a little bit about that and afterwards I'm likely

to look at the OS integration they'll take a look at how we will integrate with Android TVs homescreen to function our material we're going to discuss discoverability through research and fascinating Using the assistance so commencing which has a state of home and living room for us at

Google so know-how has improved how we communicate with the house below at Google we feel that the following wave the next leap forward in engineering for the home will originate from the intersection of hardware software package and artificial intelligence one your house to don't just be smarter together with your

house not simply must be additional helpful but every one of us we want are your private home to give you the results you want and bringing alongside one another hardware software package and synthetic intelligence to deliver an unbelievable Spurs to our customers which needless to say is anchored via the Google assistant the useful Google procedure that

provides with each other lookup that delivers together media and each of the media points and most of the media contact points at Google and if we are discussing media there isn't a far better spot to consume media and to look at media than the bigger display screen your own home And so the Android TV is

at the guts with the media within the Google assistant electricity in your own home you may have your intelligent cell phone your wise car or truck your Wise speakers as well as the Android Television brings every thing alongside one another in one put media games audio and all those encounter jointly into a person large display in the

family room Android TV found a great deal of momentum recently 6 out of the very best 6 outside of 10 prime Intelligent Television set manufactures are transport TVs with Android Tv set and more than a hundred and forty pay out Television set operators are shippi set up packing containers with android Television at the same time this has

been a tremendous enhance over the past few years which terrific momentum that we're viewing on Android TV extends to builders too we just lately introduced that we have now more than 5,000 apps on Google Participate in for Android Television around a thousand of them becoming for from steaming

streaming written content suppliers so there is a good deal happening Android Television and at Google we've been concentrating loads of endeavours in Android Television set so let's talk about a terrific generating great participating Android Television set applications so to begin what helps make an entry Tv set app or an Android application

and Android Television app because of class currently being Android indicates which you can reuse your entire skills as an Android developer to generate an Android Television set application but what makes it a Tv set application properly get started with the basic principles You must declare your capabilities and I understand this

is admittedly primary but I need you to accurate to touch on this simply because as I discussed There are many of huge apps that skips or misses Some Fundamentals and no fantastic participating application is effective in case you overlook the basics so of course the 1st aspect that

you'll want to declare is you Never hit my contact screen since the very last time I checked people today You should not go and touching their home display TVs their lounge Television set so In the event the detail their fingers are interact employing a remote control also You need to declare which you

use linkback this doesn't automatically confer with the link back library website link back again Is that this generic term that we use to determine this knowledge of watching Television which differs from using a cellular machine because you're utilizing it in a distance in the link again position inside of a link

again predicament so You will need to declare that following You should declare your software banner just stage I will communicate a bit more about manner that's something which we normally have issues with and finally You must declare your Android Television set intent which isn't

the key tent therefore you declare your Leanback launcher so Poona you happen to be putting out alongside one another you declare the features which you use you declare the banner and you declare your url back again in intent one particular two a few your functions your banner in our backlink back intent but I desire to

discuss far more a little bit more about the app banner itself that is the banner in case you ever applied Android Television you understand how it appears to be but here's the issue in many lots of predicaments you might glance Mistaken and in several applications we've seen looking Completely wrong among this sort of examples is

any time you provide a cell icon below Android TV application what comes about would be that the icon are going to be scaled and put Within the dark rectangle so it appears like this Odd mixture of a square icon inside of a rectangle spot this takes place when you offer a cellular icon 512 by

512 with your cute xhdpi folder in order that's Completely wrong tend not to do this also when you deliver any banner There's larger sized than 300 320 by 180 does not issue through which folder you set it it isn't really going to look effectively this isn't in this instance We now have a nine

and sixteen by 540 pixel graphic in The remainder drawable folder it isn't going to perform if you place in a unique spot so in this article I possess the very same image put in the drawable way TV DPI also does not glance correctly all over again how to make it happen is precisely three hundred 320 by

a hundred and eighty pixels in the rest drawable xhdpi folder this fashion your banner appears to be like properly and remembering that our banner is used to talk to your app representation but it's also utilised in other places like one example is during the basic x roll so possibly nailing it down the right way is very important at last if

you would like your application to generally be revealed for while in the Enjoy Shop for Android Tv set You will find there's special decide-in distribution you have to examine If you don't do this it isn't really going to go to the Enjoy Retailer so in your Play console You should uncover

this distributor app on Android Tv set it's not adequate to show it is not adequate to point out that you've got a connection back launcher you actually have to uncover this distributor on TV and Verify that box and The key reason why for that is there are lots of plant numerous hybrid platforms

or multi-platform atmosphere progress environments that instantly states that all the things is enabled just like a Leanback launcher for example but you could never ever have basically tested none on TV by utilizing these these improvement environment so that does not essentially imply it will operate the right way on a TV so That is why

we questioned you to check that precisely checkbox great to ensure that they're the fundamentals these are the quite bare-bones that you've to nail let us take a look at the Leanback library now not surprisingly the linkback library Is that this this set of widgets high degree widgets that we offer

they confirm to the materialized specs and they provide a fantastic knowledge for working with TV at a distance We now have widgets for the home monitor which includes for example rows plus a navigation drawer we have widgets for material aspects We've got widgets for your ton of different scenarios but

the most Regular dilemma that we hear concerning the Leanback library is perfectly the widgets that you choose to deliver isn't going to fit a hundred percent what you need so are there any approaches to personalize the Leanback library effectively the answer is yes you'll find basically two means it is possible to go about

customizing the Leanback library sorry you could just simply just alter the colors and Proportions values within your app otherwise you can offer tailor made presenters so let us chat a bit about hues and Proportions if we go especially if we glance especially on the Search fragment which is the just one

that is useful for a lot of homescreen from your home monitor of principal applications and that is the one that shows up sidebar navigation along with the rows of contents you'll find like Practically 20 Homes only about the Search fragment which you can modify within your callers and interior dimensions values things such as

brown like padding like title stereos roll types and these applies also on the navigation tower to each of the person playing cards and the like so far so such as am i able to frequent concern can I make my navigation drawer shorter Certainly you could you needn't generate code

for that https://iptvgreek.com just by shifting the Marg's as well as margin pennies along with other dimensions you are able to do that Of course we really have to do a much better occupation at documenting these Homes in some cases they don't seem to be essentially easy to locate but they exist and you may go a great distance just by

modifying the value of such Qualities now in some cases that isn't sufficient Therefore the linkback library It really is depending on MVP or Design Perspective sample which is one of the a lot of mV what ever dad and mom and several of Individuals widgets they permit you to supply a tailor made presenter I am not

gonna dwell into the main points about what helps make what's the distinction between MVP or MVC or mvvm but the fact is that on MVP your presenter functions as being the glue concerning the design plus the check out but It is also to blame for initiating or inflating in Android language the look at

which suggests that by offering a custom presenter you happen to be actually in total Charge of what you need it to appear like what you would like that widget to seem like simply because you can provide a customized watch so let us take a look at an illustration yet again I will make use of the

Look through fragment because it's the one that's mostly employed as the leading display of apps the Look through fragment it has and it expects an array object adapter for true clearly show the individual record rows and the individual listing rows just one's a header peak and a submit adapter and many others etcetera but

I will center on the upper ident presenter which can be the one that we will use to customise how the navigation drummer appears to be like so one example is say I want to possess my navigation drawer And that i need to Exhibit icons near to my textual content near to my titles well

what you can do During this code is in Java what you are able to do is supply your tailor made presenter In cases like this I am contacting it the icon header product presenter extending house header presenter and you've got two of the proper 3 distinctive solutions at bare minimum a few distinct capabilities

on produce see holder on bind industry holder and own unbind perspective holder on produce see holder in this article inflate your structure and once again since this can be a presenter you inflate layout if within the presenter that you are in total Charge of offering any view you want on Chunk look at

holder you set the contents not to mention on bite you free the methods so let us take a look suppose I need To do that icons I am able to try this by furnishing a custom perspective by utilizing a linear structure and which include not only a textual content watch which is the

default but additionally an image perspective then on by watch holder again an occasion with the view holder presenter plus the header product by obtaining the hider product I am able to connect with Attributes for example get identify and use People to fill my text look at label and icon and of course

on you override personal unbind check out holder to free of charge any resources you have used these are definitely the a few least kinds that you have to overwrite but obviously you can find Many others If you need as an example to customize how they come to feel how They appear how the individual objects seem

once they're chosen there's a single process which you can you can override for that again in black in back again within your activity you could set the header presenter selector by furnishing an occasion of the customized presenter in my situation I am unable to have their item presenter this is an outdated

illustration but why Will not you use it In any case since it's not extremely properly-known and it's again a very common concern great let's now talk about Oprah OS integration you'll find four main things which your application has to do to adequately integrate on the Android Television set operational process and

present an attractive encounter integrative look for media playback controls as activated with the assistant and naturally the home display screen integration to Enjoy up coming and customized channels let us take a look at Each individual of one of those so media found why well since it permits the people to find material

by invoking playback from lookups by voice effectively How would you get it done you make our app searchable by utilizing a written content supplier once the assistant performs query about the articles service provider it could possibly start enjoying back utilizing intents let us Check out this sample code below closer so

I'm making my very own look for conduct a material provider extending content material supplier these illustrations are in cuddling I have a create the question operate and I really have to return a cursor the way in which I'm going to do the look for well that for ice you are able to do the look for wherever you

want you'll be able to check for area content material that You may have downloaded within your app you can carry out lookups about the server whatever you do at the top you come a matrix cursor as well as their technique to Show your search results in almost every other search results now the matter is

Although you desire you can do this search on the serve you wish to get it done you need to do it rapid simply because Google will their technique will clearly show an Ender android TV will demonstrate you will find the results as they seem Therefore if each of the other applications are

more quickly than yours all in their icons all of their banners will surface initially than yours so that you need to make it more quickly subsequent media controls why perfectly because you desire to enable the consumer to control playback by using voice How can you get it done you combine media sections

media sessions to handle the callbacks so everytime you make use of the person works by using their distant to perform playback for the playback reviews things such as Engage in or pause or maybe smarter types like skip towards the prior channel or to skip to prior episodes or skip to upcoming which can be

used by both equally video clip and audio applications you can also do a thumbs up If you would like which happens to be a lesser-known feature and the way in which you do this once more you give your media session fallback by extending meters have to have a session compact callback and you can overwrite all of these

functions Really don't Enjoy on pause on quit on 6 you on skip to next on skip to previews and by control override every one of these controls and Command your own private participant and by providing this callback to the media session instance your app now responds towards the assistant playback controls

now we are going to move to discuss the integrations While using the Android TVs residence display The main a single bling staying the Enjoy upcoming row mmm so if you do not know the Android Television interface It is really designed of those rows the initial row is really a row on the

consumer favorites the end users beloved applications along with the the quite first row once the listing of the people apps is definitely the Participate in up coming job and it is a position or perhaps a channel as we phone it that aims being this worldwide space to the people material throughout different apps so

The reasoning in this article is always that any any content which the person is fascinated on or maybe the user interacted with but didn't completed your application can drive this material into the plain X row so why you keep your viewers engaged with information and battle curiosity or intriguing or haven't finished

viewing which include favored videos or up coming episodes of a series or possibly a Motion picture that he hasn't completed How does one do this well you publish your observe future program to Android entry preview channel helper you don't have to boot or be worried about your content material service provider by yourself and what

could it be perfectly the Android CBS Perform up coming row is up-to-date to mirror modern engagement and set applicable articles for the viewers fingertips s contents are additional older contents transfer to the appropriate and sooner or later of your user under no circumstances interacts Using these other contents They may be faraway from

the from their Engage in subsequent role yet again let us Check out this code a bit closer so Android X's watch another system for what follows the Builder pattern so create a builder you set the watch upcoming sort you established a type which may very well be a Motion picture

or even a collection or tunes Then you definitely supply your title and description