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

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

 

My name is Casio I am a developer relations here at Google I work largely with Android Tv set and now We'll talk about very best procedures for participating apps which can be sort of like and gay embraces a lot of stuff It can be sort of a generic title so to

narrow it down This is the things which we're going to look at I will get started by stating a little bit of the condition of dwelling and living room as we have an understanding of in this article Google then I'll move to look at some Android Television basics which lots of huge key

applications to missus and and and it has some issues in there and no partaking application And that i got fantastic a fantastic partaking app start of receiving every one of the Fundamentals proper then we're transferring to speak a little bit in regards to the linkback library and among the major questions that

Every person constantly has that is how do I customise the Leanback library it will not match essentially the what I want particularly can I modify it could I customise it spoiler notify the answer is mostly yes and we're going to speak a bit about that after which you can I'm heading

to take a look at the OS integration they will talk about how we will integrate with Android TVs homescreen to feature our content we are going to speak about discoverability as a result of lookup and engaging Together with the guidance so commencing that has a condition of residence and living room for us at

Google so technological know-how has altered how we interact with the home listed here at Google we believe that the following wave the next breakthrough in technology for the house will come from the intersection of components software program and synthetic intelligence one particular your property to not merely be smarter with the

residence don't just really should be additional handy but most of us we would like are your house to give you the results you want and bringing collectively components computer software and synthetic intelligence to offer an unbelievable Spurs to our customers and this not surprisingly is anchored from the Google assistant the beneficial Google program that

provides alongside one another research that delivers collectively media and the many media factors and all of the media Get hold of points at Google and if we're speaking about media there is not any better spot to eat media and to watch media than The larger monitor your own home And so the Android Tv set is

at the center with the media in the Google assistant electricity in your house you might have your clever cell phone your smart car your Intelligent speakers along with the Android TV brings every little thing with each other in a single place media video games new music and all of those knowledge together into one major display screen in your

front room Android Tv set viewed a great deal of momentum not long ago six from the top 6 from ten prime Smart Television set manufactures are transport TVs with Android Television set and more than a hundred and forty pay out TV operators are shippi setup boxes with android Television set in addition this has

been a large boost in the last few years and this wonderful momentum that we've been looking at on Android Television extends to builders also we lately introduced that We've got now in excess of 5,000 applications on Google Play for Android Television set around a thousand of them currently being for from steaming

streaming content vendors so there's a ton taking place Android Tv set and at Google we're concentrating many attempts in Android Tv set so let us look at an excellent creating great engaging Android TV apps so to get going what tends to make an entry TV application or an Android app

and Android Tv set application as a consequence of course getting Android indicates that you could reuse all of your expertise as an Android developer to make an Android TV app but what makes it a Television set app properly get started with the basics It's important to declare your characteristics and I am aware this

is de facto fundamental but I would like you to definitely true to the touch on this since as I mentioned There are plenty of massive apps that skips or misses Some basics and no great partaking app functions in case you skip the fundamentals so obviously the primary aspect that

you need to declare is you Really don't hit my touch monitor since the last time I checked people today Will not go and touching their dwelling screen TVs their front room Tv set so If your factor their fingers are interact utilizing a handheld remote control also You must declare you

use linkback this doesn't essentially make reference to the hyperlink again library website link back is this generic expression that we use to outline this working experience of observing TV which is different from using a cell unit simply because you're utilizing it at a length in a very website link back place in a hyperlink

back again predicament so You must declare that upcoming You should declare your software banner just place I will speak a bit more about method and that is something which we normally have issues with And at last You will need to declare your Android Television intent which isn't

the key tent which means you declare your Leanback launcher so Poona you might be Placing out alongside one another you declare the functions that you simply use you declare the banner and you simply declare your backlink back again in intent one two a few your capabilities your banner in our backlink again intent but I want to

converse more a bit more about the application banner itself that's the banner for those who ever utilised Android Tv set you know the way it looks but here's the issue in several numerous cases you may seem Mistaken and in several applications we have seen on the lookout Completely wrong considered one of these kinds of illustrations is

if you offer a cell icon here Android Television application what takes place would be that the icon will probably be scaled and place inside the darkish rectangle so it seems like this Bizarre mix of a sq. icon inside of a rectangle spot this takes place once you provide a cellular icon 512 by

512 in your lovable xhdpi folder to ensure that's Mistaken never do this also if you give any banner You can find bigger than three hundred 320 by 180 will not make any difference where folder you set it it's actually not heading to appear correctly this is not in this example Now we have a nine

and sixteen by 540 pixel image in The remainder drawable folder it would not work if you put in a special place so listed here I have the very same picture set from the drawable way Tv set DPI also doesn't glance effectively all over again the way to do it is strictly 300 320 by

180 pixels in The remainder drawable xhdpi folder this fashion your banner appears to be the right way and remembering that our banner is accustomed to ask your application illustration but It is also utilized elsewhere like one example is during the plain x roll so possibly nailing it down accurately is critical last but not least if

you wish your application to become revealed for within the Participate in Retail outlet for Android TV There's a Unique choose-in distribution you have to examine If you don't do that it is not going to go for the Perform Retailer so as part of your Engage in console You must come across

this distributor application on Android Television it's actually not more than enough to show it is not sufficient to show that you have a url again launcher you even have to uncover this distributor on Television and Test that box and the reason for that's that there are quite a few plant several hybrid platforms

or multi-platform setting improvement environments that immediately claims that every little thing is enabled like a Leanback launcher by way of example but you may in no way have essentially tested none on TV by utilizing these these growth natural environment so that doesn't automatically necessarily mean it may work properly with a Television so This is why

we requested you to examine that specially checkbox great to ensure that that these are the fundamentals these are typically the very bare-bones that you've to nail let's talk about the Leanback library now needless to say the linkback library is this this list of widgets substantial stage widgets that we provide

they affirm to your materialized specs and they supply a terrific expertise for working with TV in a length We've got widgets for the home display which contains one example is rows and also a navigation drawer We've got widgets for written content facts We've widgets to get a large amount of different scenarios but

one of the most Recurrent question that we hear with regards to the Leanback library is very well the widgets that you simply supply does not suit a hundred percent what you require so are there any methods to customize the Leanback library nicely the answer is Sure you'll find generally two means it is possible to go about

customizing the Leanback library sorry it is possible to just merely change the colours and Proportions values with your application or you can provide custom presenters so let's discuss a little bit about shades and dimensions if we go particularly if we look specifically in the Browse fragment which happens to be the one

that may be employed for many homescreen from home monitor of principal programs which is the one which demonstrates up sidebar navigation as well as the rows of contents there are actually like Nearly twenty Attributes only regarding the Look through fragment you can modify within your callers and interior dimensions values things like

brown like padding like title stereos roll kinds and these applies also for the navigation tower to each of the individual cards and the like to this point so for instance can I Recurrent problem am i able to make my navigation drawer shorter Sure you could you don't need to publish code

for that just by transforming the Marg's as well as the margin pennies and various dimensions you can do that Of course we really have to do a better occupation at documenting these Homes occasionally they don't seem to be necessarily effortless to seek out Nonetheless they iptvgreek.com/iptv-channels/ exist and you will go a good distance just by

modifying the worth of such properties now in some instances that isn't adequate so the linkback library It really is according to MVP or Design See sample which is probably the many mV what ever mothers and fathers and many of Those people widgets they allow you to give a personalized presenter I'm not

planning to dwell into the details about what makes what is the distinction between MVP or MVC or mvvm but the fact is that on MVP your presenter acts given that the glue in between the product along with the check out but it's also liable for initiating or inflating in Android language the look at

which means that by providing a custom made presenter you're actually in full control of what you wish it to appear like what you wish that widget to look like simply because you can offer a custom made look at so let us take a look at an example yet again I'm going to utilize the

Browse fragment mainly because it's the one which's mostly utilized as the key screen of apps the Browse fragment it consists of and it expects an array item adapter for genuine exhibit the person record rows and the person record rows one particular's a header top and a publish adapter and so forth etcetera but

I'm going to give attention to the higher ident presenter which can be the one which we can use to personalize how the navigation drummer looks so as an example say I want to acquire my navigation drawer And that i wish to Screen icons near my textual content near my titles nicely

what you are able to do In this particular code is in Java what you can do is offer your tailor made presenter in this case I am contacting it the icon header item presenter extending house header presenter and you've got two of the appropriate three diverse procedures at bare minimum amount 3 unique functions

on create look at holder on bind field holder and very own unbind see holder on generate look at holder in this article inflate your structure and once again because this is a presenter you inflate structure if throughout the presenter that you are in finish Charge of offering any view that you'd like on bite watch

holder you established the contents not to mention on bite you free of charge the methods so let us take a look suppose I want To do that icons I am able to do that by giving a tailor made look at by utilizing a linear layout and such as not simply a text see and that is the

default but also an image see then on by perspective holder all over again an instance of your watch holder presenter along with the header merchandise by getting the hider product I can simply call Qualities such as get identify and use All those to fill my textual content watch label and icon not to mention

on you override personal unbind see holder to no cost any means you have utilized they are the a few minimum types that you've to overwrite but certainly there are actually Some others In order for you for instance to personalize how they sense how They appear how the individual things glimpse

after they're picked you can find one particular process that you could you could potentially override for that back again in black in again within your action you can set the header presenter selector by furnishing an instance within your custom presenter in my case I can not have their product presenter This can be an old

case in point but why You should not you employ it In any case since it's not pretty well-known and It really is once again a very common issue fantastic let's now talk about Oprah OS integration you will find four major things which your application should do to thoroughly combine with the Android Tv set operational procedure and

deliver an attractive practical experience integrative lookup media playback controls as activated because of the assistant and naturally the home display integration to Participate in future and custom channels let us Examine Each individual of one of such so media discovered why perfectly mainly because it makes it possible for the users to discover written content

by invoking playback from lookups by voice very well How would you get it done you make our application searchable through the use of a written content supplier if the assistant performs query about the content supplier it could start actively playing again applying intents let's Check out this sample code here closer so

I'm making my very own search conduct a written content company extending content provider these illustrations are in cuddling I've a produce the query operate and I really need to return a cursor the best way I'll do the look for properly that for ice you are able to do the research anyplace you

want you could check for regional written content that you might have downloaded in the application you may conduct lookups about the server no matter what you do at the top you come back a matrix cursor as well as their system to Exhibit your search engine results inside another search results now the matter is

Although you desire you are able to do this search with your provide you need to do it you wish to get it done fast because Google will their system will display an Ender android Television set will demonstrate there's the outcomes as they appear so if the entire other apps are

faster than yours all in their icons all in their banners will show up to start with than yours therefore you need to make it a lot quicker up coming media controls why nicely as you need to allow the consumer to regulate playback by making use of voice How can you get it done you integrate media sections

media periods to handle the callbacks so everytime you use the person works by using their distant to perform playback towards the playback comments things such as Participate in or pause or maybe smarter ones like skip to your former channel or to skip to preceding episodes or skip to upcoming which may be

employed by both equally movie and audio apps you can also do a thumbs up If you would like and that is a lesser-recognized element and just how you do this again you offer your media session fallback by extending meters have to have a session compact callback and you can overwrite most of these

features Never Perform on pause on halt on six you on skip to future on skip to previews and by Manage override most of these controls and Regulate your personal participant and by offering this callback on your media session occasion your app now responds to your assistant playback controls

now we're going to transfer to mention the integrations with the Android TVs dwelling screen The most crucial one particular bling getting the Enjoy next row mmm Therefore if you do not know the Android TV interface It really is built of such rows the primary row is actually a row in the

consumer favorites the users favored applications along with the the very initially row following the listing of the customers apps will be the Enjoy upcoming part and it is a part or simply a channel as we simply call it that aims for being this global Place for your users information throughout unique applications so

The reasoning below is the fact any any content material that the person is intrigued on or perhaps the person interacted with but did not completed your application can drive this written content into the plain X row so why you keep your viewers engaged with written content and fight interest or exciting or have not completed

seeing for instance liked movies or upcoming episodes of the sequence or a Motion picture that he hasn't finished How would you try this properly you publish your view next method to Android accessibility preview channel helper you won't have to boot or be concerned about your information supplier yourself and what

is it nicely the Android CBS Enjoy subsequent row is current to replicate modern engagement and set relevant content material in the viewers fingertips s contents are added older contents move to the best and eventually of your consumer never ever interacts Using these other contents They're removed from

the from their Perform next position again let us Check out this code a bit nearer so Android X's enjoy the subsequent plan for what follows the Builder sample so make a builder you set the check out up coming variety you set a kind which may very well be a Motion picture

or even a collection or audio Then you definately provide your title and description plus your poster artwork URI It is