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

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

 

My title is Casio I am a developer relations right here at Google I work mainly with Android TV and today We'll speak about best methods for partaking apps which can be style of like and gay embraces many things It really is kind of a generic title so to

slim it down here's the things that We'll speak about I'm going to get started by expressing a small amount of the state of household and living room as we comprehend listed here Google then I'm going to transfer to speak about some Android Television set Principles which lots of significant important

apps to missus and and and it has some errors in there and no engaging application And that i acquired excellent an incredible participating application start out of receiving all of the Fundamental principles suitable then we are going to talk a little bit concerning the linkback library and among the list of big questions that

everybody often has that is how do I personalize the Leanback library it won't match automatically the what I want specifically am i able to alter it could possibly I customize it spoiler inform the answer is usually Indeed and we're going to speak a bit about that after which I am going

to speak about the OS integration they are going to talk about how we could integrate with Android TVs homescreen to attribute our information we're going to discuss discoverability through lookup and engaging With all the help so starting off which has a state of dwelling and front room for us at

Google so technologies has altered how we communicate with the house below at Google we think that the next wave another step forward in engineering for the home will come from the intersection of components application and artificial intelligence a person your home to not simply be smarter along with your

home not simply must be more helpful but many of us we wish are your home to be just right for you and bringing together components computer software and artificial intelligence to offer an unbelievable Spurs to our end users which certainly is anchored with the Google assistant the beneficial Google method that

brings jointly look for that brings alongside one another media and the many media details and every one of the media Make contact with factors at Google and when we're discussing media there is not any improved location to consume media and to look at media than the bigger display screen your house Therefore the Android Television set is

at the heart of the media inside the Google assistant electric power in your own home you can have your intelligent cellular phone your wise vehicle your Smart speakers plus the Android Television set provides anything together in a single location media online games songs and all those practical experience together into 1 major screen in your

front room Android Television observed many momentum recently 6 outside of the highest six away from ten top Sensible TV manufactures are transport TVs with Android Television and around 100 and forty spend Television set operators are shippi arrange containers with android TV too this has

been a massive raise in the last few years and this terrific momentum that we are seeing on Android Tv set extends to developers at the same time we just lately declared that We've got now over five,000 apps on Google Participate in for Android Tv set in excess of a thousand of these becoming for from steaming

streaming written content providers so there's a good deal going on Android Tv set and at Google we're focusing a lot of efforts in Android TV so let's speak about an excellent building good engaging Android Television apps so to start out what can make an entry Tv set application or an Android application

and Android Television app on account of training course remaining Android usually means you could reuse all of your current capabilities as an Android developer to develop an Android Television set application but what makes it a Tv set application properly start with the basic principles You will need to declare your attributes and I'm sure this

is admittedly primary but I need you to real to touch on this because as I discussed There are tons of big applications that skips or misses A few of these Fundamental principles and no good engaging application functions in the event you miss the fundamentals so needless to say the very first characteristic that

you have to declare is you Do not strike my contact display because the very last time I checked people Will not go and touching their property display screen TVs their family room Tv set so In case the factor their fingers are interact employing a remote control also You will need to declare that you just

use linkback this does not necessarily confer with the hyperlink back library website link back again is this generic expression that we use to outline this practical experience of observing Tv set which is different from employing a cellular unit simply because you're using it in a distance in the backlink again place inside a hyperlink

back again condition so You should declare that up coming you have to declare your software banner just place I'll talk a little bit more about way that's a thing that we usually have problems with And eventually You should declare your Android TV intent which isn't

the key tent this means you declare your Leanback launcher so Poona you're Placing out together you declare the functions that you use you declare the banner and also you declare your connection back again in intent a person two a few your capabilities your banner in our hyperlink back again intent but I would like to

communicate far more a bit more about the app banner by itself that's the banner should you ever utilised Android Television set you know how it seems to be but This is the detail in many several cases you could possibly seem Completely wrong and in lots of applications we have seen hunting wrong considered one of this sort of examples is

any time you supply a cellular icon in this article Android Television application what occurs would be that the icon might be scaled and set inside the dark rectangle so it appears like this weird blend of a square icon inside a rectangle region this takes place when you offer a cellular icon 512 by

512 inside your cute xhdpi folder making sure that's Erroneous tend not to try this also for those who give any banner There is certainly larger sized than three hundred 320 by 180 does not make a difference by which folder you put it it isn't going to seem effectively this is not in this instance We've a 9

and 16 by 540 pixel picture in the rest drawable folder it isn't going to operate if you set in a special spot so listed here I hold the exact graphic put inside the drawable way TV DPI also isn't going to seem properly once again the best way to do it is precisely three hundred 320 by

one hundred eighty pixels in the rest drawable xhdpi folder in this manner your banner appears to be properly and remembering that our banner is accustomed to ask your application representation but it's also employed somewhere else like for instance from the basic x roll so maybe nailing it down effectively is vital ultimately if

you wish your software for being revealed for within the Participate in Retail store for Android TV there is a Particular choose-in distribution you have to check if you do not do this it's actually not planning to go with the Enjoy Store so in the Engage in console It's important to uncover

this distributor app on Android Tv set it's not more than enough to indicate it's not sufficient to point out you have a connection back again launcher you actually have to find this distributor on Tv set and Examine that box and the reason for that's that there are lots of plant numerous hybrid platforms

or multi-platform natural environment development environments that immediately suggests that everything is enabled like a Leanback launcher for instance but you might in no way have truly tested none on TV by making use of these these development setting so that does not necessarily suggest it should work accurately with a Television so That is why

we requested you to examine that specially checkbox excellent to ensure that these are definitely the fundamentals these are generally the really bare-bones that you've got to nail let us mention the Leanback library now not surprisingly the linkback library is this this list of widgets superior level widgets that we offer

they verify for the materialized specs and they provide an awesome encounter for making use of Television set at a distance Now we have widgets for the house screen which includes one example is rows and also a navigation drawer We have now widgets for material information We've got widgets for your whole lot of various cases but

by far the most Repeated query that we hear with regard to iptvgreek.com/iptv-restream/ the Leanback library is perfectly the widgets that you choose to deliver doesn't fit 100 per cent what you would like so are there any methods to personalize the Leanback library nicely the answer is Indeed you will find in essence two techniques it is possible to go about

customizing the Leanback library sorry you are able to just simply alter the hues and dimensions values as part of your application otherwise you can provide customized presenters so let us discuss a bit about colours and dimensions if we go precisely if we glance especially on the Browse fragment which happens to be the one

that is definitely used for lots of homescreen from your home screen of primary purposes that is the one that reveals up sidebar navigation as well as the rows of contents you will find like Virtually 20 Homes only about the Look through fragment that you can modify in the callers and internal Proportions values things such as

brown like padding like title stereos roll models and these applies also for the navigation tower to every of the individual cards etc thus far so one example is can I Regular concern can I make my navigation drawer shorter Sure you could you needn't compose code

for that just by transforming the Marg's plus the margin pennies and also other Proportions you are able to do that Certainly we really have to do a greater position at documenting these Attributes occasionally they're not automatically simple to find However they exist and you can go a long way just by

modifying the value of those Attributes now occasionally that's not adequate Hence the linkback library It truly is determined by MVP or Model Watch pattern which has become the quite a few mV what ever mother and father and plenty of of These widgets they assist you to give a personalized presenter I am not

gonna dwell into the small print about what tends to make what's the difference between MVP or MVC or mvvm but The reality is that on MVP your presenter acts as the glue among the model and the see but It is also answerable for initiating or inflating in Android language the check out

which implies that by giving a custom presenter you are really in full Charge of what you need it to appear like what you want that widget to appear like simply because you can provide a personalized perspective so let us Check out an instance once more I'll make use of the

Look through fragment as it's the one that's generally employed as the key display screen of applications the Browse fragment it is made up of and it expects an array object adapter for true clearly show the person listing rows and the person listing rows a single's a header peak and also a article adapter and so forth and so on but

I will give attention to the upper ident presenter which can be the one that we will use to customise how the navigation drummer appears to be like so as an example say I need to obtain my navigation drawer and I want to Display screen icons near to my textual content near my titles well

what you are able to do In this particular code is in Java what you are able to do is supply your tailor made presenter in this case I'm calling it the icon header product presenter extending property header presenter and you have two of the best three unique techniques at bare bare minimum 3 various features

on build see holder on bind field holder and personal unbind watch holder on make watch holder here inflate your format and once again for the reason that this is a presenter you inflate format if in the presenter you happen to be in entire Charge of giving any view that you'd like on Chunk see

holder you set the contents not to mention on bite you cost-free the methods so let us take a look suppose I need To accomplish this icons I can do that by supplying a tailor made perspective by making use of a linear format and which include not simply a text see that's the

default but will also a picture check out then on by look at holder all over again an occasion with the see holder presenter plus the header merchandise by receiving the hider product I am able to call Qualities such as get name and use Those people to fill my textual content watch label and icon and naturally

on you override have unbind look at holder to absolutely free any sources that you've got applied these are the 3 minimum amount types that you've to overwrite but naturally you can find Other people In order for you one example is to customise how they experience how they look how the individual objects glimpse

if they're chosen there is certainly 1 system which you can you may override for that back again in black in again inside your action you can established the header presenter selector by offering an occasion of one's customized presenter in my circumstance I am unable to have their product presenter This is certainly an old

instance but why don't you use it In any case as it's not extremely nicely-known and It can be once again a quite common dilemma fantastic let's now mention Oprah OS integration you'll find 4 key things that your app should do to properly integrate on the Android Television operational program and

provide an interesting knowledge integrative lookup media playback controls as activated with the assistant not to mention the home display screen integration to play up coming and custom channels let's Consider each of one of those so media identified why perfectly because it allows the end users to find information

by invoking playback from lookups by voice perfectly how do you get it done you make our app searchable by utilizing a material service provider if the assistant performs query around the content material company it might commence actively playing again applying intents let us take a look at this sample code here closer so

I am developing my own lookup perform a articles provider extending content material supplier these illustrations are in cuddling I've a generate the question operate And that i must return a cursor just how I'm going to do the research properly that for ice you can do the research wherever you

want you could look for local content that you might have downloaded inside your app it is possible to carry out queries about the server what ever you do at the tip you come back a matrix cursor and their process to Exhibit your search results inside some other search engine results now the matter is

Regardless that you'd like you can do this research on your provide you need to get it done you ought to do it quick simply because Google will their process will clearly show an Ender android Tv set will show there's the results as they appear so if all the other apps are

quicker than yours all of their icons all in their banners will surface to start with than yours this means you need to make it faster up coming media controls why nicely since you would like to allow the user to control playback through the use of voice how do you get it done you combine media sections

media classes to manage the callbacks so everytime you use the user utilizes their distant to accomplish playback to the playback reviews things like Participate in or pause or perhaps smarter types like skip for the past channel or to skip to past episodes or skip to future that may be

used by both equally video clip and audio applications you can also do a thumbs up If you prefer which happens to be a lesser-recognised aspect and how you do this all over again you supply your media session fallback by extending meters need a session compact callback and you can overwrite all these

features Will not Perform on pause on quit on six you on skip to following on skip to previews and by Handle override these controls and control your individual player and by furnishing this callback towards your media session instance your app now responds for the assistant playback controls

now we are going to shift to look at the integrations with the Android TVs residence screen A very powerful one bling becoming the Perform up coming row mmm Therefore if you do not know the Android Tv set interface It can be built of these rows the first row is a row of the

consumer favorites the people favorite applications as well as the the quite 1st row after the list of the buyers apps would be the Perform future job and it is a part or simply a channel as we connect with it that aims to become this world wide space for the customers content throughout different apps so

The reasoning listed here is usually that any any information that the consumer is fascinated on or even the person interacted with but didn't concluded your application can press this information on the plain X row so why you maintain your viewers engaged with written content and battle desire or appealing or haven't completed

watching such as preferred movies or subsequent episodes of the collection or possibly a Motion picture that he has not finished how do you try this well you publish your view subsequent application to Android obtain preview channel helper you don't need to boot or be concerned about your content material provider your self and what

can it be well the Android CBS Engage in future row is current to reflect current engagement and put suitable information at the viewers fingertips s contents are extra more mature contents go to the right and eventually with the person in no way interacts with these other contents they are removed from

the from their Enjoy upcoming role again let us Have a look at this code a bit closer so Android X's view the next application for what follows the Builder sample so create a builder you set the enjoy upcoming type you set a kind which could possibly be a Film

or perhaps a collection or songs Then you certainly present your title and outline as well as your poster artwork URI it's also vital to set the last time of engagement since this image is likely to be slightly