Layout elements looks blurry on 4K screen Android TV

I am developing an app for Android TV it is a screensaver app and I just loading a URL in WebView I have used DayDream Service for this purpose everything is fine, I just want to know that how can I make my layout to support 4K resolution, because when I load [http://howbigismybrowser.com/] it shows 960*500 every time no what configuration I am using. I have seen google official doc on the link[https://developer.android.com/training/multiscreen/screensizes]also, I have seen this link and implemented the same linkI have tried by making folder co...Read more

amazon fire tv - How to hide voice search icon in searchfragment using android Tv

How to hide Voice search icon in android firetv extends android.support.v17.leanback.app.SearchFragment library. its coming default in my code when i extended that search library... For now i dont want to use voice search functionality...Below listener is coming default ::: setSpeechRecognitionCallback(new SpeechRecognitionCallback() { @Override public void recognizeSpeech() { Log.v(TAG, "recognizeSpeech"); try { Intent mSpeechRecognizerIntent = getRecognizerIntent(); ...Read more

xiaomi - Android tv lagging after sleepping (Mi box 4)

Environment:Xiaomi Mi Box 4Android 8.1.0My box is pretty much useless after sleep. When I try to watch something in youtube or netflix the image or sound gets stucked very frequently and makes a weird noise.It's so slow that I can't use it unless I reboot it, but just for a few time.Any configuration to avoid this issue or to improve the performance?...Read more

android tv - Unable to refresh/update browsefragment using ArrayObjectAdaptor's clear() and addAll()

I have a browsefragment thats displaying rows from a JSON file generated by PHP when a PHP page is called. I am trying to get the browsefragment to refresh the rows as the JSON data will be changing regularly. Following the instructions on https://hackernoon.com/how-to-refresh-the-android-tv-browsefragment-6e4d2d3c6690, I added clear() and addAll() methods found in the ArrayOjectAdapter.The main portion of my browseFragment is:public class MainFragment extends BrowseSupportFragment implements LoaderManager.LoaderCallbacks<LinkedHashMa...Read more

android tv - Add button to BrowseFragment

I am developing an Android TV app using Leanback support library. I need to display a button in the top right corner (below the badge) of BrowseFragment. (as on below image)Here is the layout code<?xml version="1.0" encoding="utf-8"?><fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/main_browse_fragment" android:name="tv.bishan.com.videoapp.ui.ItemFragment" android:layout_width="match_par...Read more

android tv - How to figure out what is wrong when NEP on Presenter.onCreateViewHolder in leanback was thrown

After data arrived form server I do simply thing: private fun updateItemsOnUi(items: List<Item>) { val listRowAdapter = ArrayObjectAdapter(ItemPresenterSelector()) val header = HeaderItem(0, "") for (item in items) listRowAdapter.add(item) rowsAdapter.add(ItemListRow(header, listRowAdapter, null)) }I rewrite simple example with detail screen. And after that I get such exception, but there is no point to my code so how to investigate what I was doing wrong? java.lang.NullPointerException: Attempt to invoke...Read more

Persistent header fragment (disable animation) in Android TV (leanback)

Anyone knows how to achieve the question in the title? The objective is to avoid the animation that results in the Headers bar disappearing as the Leanback app zooms in on the Row Item once a Header has been clicked.setHeadersState of BrowseSupportFragment doesn't help. Perhaps something to do with hijacking startHeadersTransitionInternal during OnHeaderClickedListener? If so, any idea how to correctly implement it?...Read more

android tv - Connecting without Microsoft Health App

I've been tinkering with the microsoft band for a while and i'm trying to connect it to a raspberry pi 3 running android TV(couldn't find any Android phone images), now i've got most normal apps running on the rasp , the microsoft health app crashes when i start it. Funny thing is though, the costum app i've made to track all the sensors stil gets data from the band when paired, but the band itself just:says "pairing succes! return to the microsoft health app to continue" So there has to be a way to bypass the app right?So i'm trying to find a ...Read more

Android Management API (COSU) on AndroidTV?

Android Management APIs are supposed to be "compatible with any device running Android 5.1 or above that has Google Play installed." I really want that to be true, but am having trouble with Android TVs. (Specifically, a NexBox A95x and a TX3mini I'm testing with.)My stumbling point is how to enter the enrollment token into the device when provisioning it? I had no problem with a Samsung tablet. But, the Android TVs don't use the same startup wizard after hardware reset, so there doesn't seem to be an opportunity to trigger a QR reader, or manu...Read more

Focusing button by default in android tv

I have an Android tv Layout with two buttons:Buttons are not focusedI want one button to be focused by default:Focusing choose a TV button by default.I have tried a few methods.In java file final Buttonspinner spinner = findViewById(R.id.choose_folder); spinner.requestFocus(); spinner.setFocusable(true);In xmlandroid:state_focused="true"Still, it's not getting focused by default. How can I achieve this?...Read more

android tv - Widevine DRM Content on Exoplayer 2.0

I am trying to play Widevine encrypted content on an Android TV application using Exoplayer. I have my video URL which is served from a CDN and acquired with a ticket. I have my widevine license URL, a ticket and a auth token for the license server.I am creating a drmSessionManager, putting the necessary headers needed by the license server as follows:UUID drmSchemeUuid = C.WIDEVINE_UUID;mediaDrm = FrameworkMediaDrm.newInstance(drmSchemeUuid);static final String USER_AGENT = "user-agent"; HttpMediaDrmCallback drmCallback = new HttpMediaDrmCa...Read more