android-tv

How to add a splash screen to my android tv app ?

倖福魔咒の 提交于 2019-12-23 21:26:25
问题 does anyone know how to add a splash screen to an Android TV App ? what is making it hard for me is that the main activity should have Theme.Leanback in order to be accepted in the google play , and to have a splash screen you need your own style/theme. So how to do this ? 回答1: You can customise Leanback's OnboardingFragment slightly to display it as splash screen. OnboardingFragment allows you to add on-boarding steps but if you don't need them you can just set setLogoResourceId inside

how to implement notification in android TV

可紊 提交于 2019-12-23 20:16:13
问题 Can it possible to send push notification in Android TV through FCM? If it is possible then how can we send push notification through FCM and how to show it in Android TV? 回答1: Yes, you can send notifications to Android TV, they will arrive to your service. Now that since there is no system tray, there is no default UI got them, so you need to do that yourself, you can't use the default behavior and you can't use notification manager. 回答2: I think notification will appear just as

Android TV Emulator: No Internet Access

自闭症网瘾萝莉.ら 提交于 2019-12-23 17:22:47
问题 My App is unable to access the Internet, when I run it on an Android TV emulator. I thought it was my code, but the same app can access the Internet just fine when I run it on a phone emulator like the Nexus 5. What could be wrong? Android_TV_1080p_API_23.avd, config.ini: avd.ini.encoding=UTF-8 AvdId=Android_TV_1080p_API_23 abi.type=x86 avd.ini.displayname=Android TV (1080p) API 23 disk.dataPartition.size=200M hw.accelerometer=no hw.audioInput=yes hw.battery=no hw.camera.back=none hw.camera

How to differentiate a D-pad movement from a Joystick movement?

微笑、不失礼 提交于 2019-12-23 09:56:10
问题 I need to have two different behaviors, one for D-pad and another for the analog Joystick (on the same gamepad). The problem is that on the onGenericMotionEvent callback, both have the same information on the MotionEvent and I am not able to distinguish them. // d-pad MotionEvent { action=ACTION_MOVE, id[0]=0, x[0]=-1.5259255E-5, y[0]=-1.5259255E-5, toolType[0]=TOOL_TYPE_UNKNOWN, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=151637936, downTime

Leanback for Android TV : Unsetting Video Title Increases Spacing between Rows

血红的双手。 提交于 2019-12-22 09:30:42
问题 The PlaybackOverlayFragment of the sample app uses the PlaybackControlsGlue to set up playback controls based on the data model. This is the look when using the standard glue: My problem is that I don't want the title/subtitle text to appear above the main player controls bar - we want them at the top left of the player screen instead. Therefore, to disable the showing of title/subtitle, I override createControlsRowAndPresenter() of the glue and use the empty-args constructor of

How to implement scrolling in RecyclerView on Android TV?

三世轮回 提交于 2019-12-21 17:01:59
问题 I have an application which I need adapt for Android TV. This application contains horizontal RecyclerView and it doesn't scroll when I press D-pad buttons on remote control. I found this solution, but it crashes. Here is the code: <ru.myapp.package.HorizontalPersistentFocusWrapper android:layout_width="wrap_content" android:layout_height="wrap_content"> <android.support.v7.widget.RecyclerView android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="250dp"

Making AndroidTV app workable on FireTV

我怕爱的太早我们不能终老 提交于 2019-12-21 13:45:29
问题 I have an android tv app using a leanback library that I want to publish to amazon tv store also. I know that we can use leanback library for fire tv as per this link using a standard LAUNCHER . However I am not sure about a few things: Recommendations Android TV display content recommendations in the first row of the TV home screen Content recommendations appear as the first row of the TV home screen after the first use of the device For this we need to create a recommendation service and

Android TV move focus between RecyclerViews

大憨熊 提交于 2019-12-21 12:59:59
问题 I am building an Android TV app with the following layout: Both lists on the left and on the right are RecyclerViews with vertical LinearLayoutManagers, Header view is static. Navigation with D-PAD works fine within one list, but when switching from one list to another there are issues. Focus moves from, say list1's item 5 to list2' item 5. When list 2 is short has less than 5 items, it just loses focus. I want the last focused item index saved and when the user navigates list1-list2-list1

Multiple ListRows for each Header on BrowseFragment - Leanback library

廉价感情. 提交于 2019-12-21 04:06:27
问题 I'm getting started with Leanback support for our app. As per UI requirements I need to add multiple list rows corresponding to each header, it's exactly like what Youtube App does on Android TV. Default ListRowPresenter seems to be rendering only one list row and its header. Is there any presenter that supports multiple list rows? I'm thinking on the lines creating a custom presenter with RowsFragment embedded in each item, correct me if my approach is wrong. 回答1: The Leanback team has

Android Facebook SDK 3.23.0 - FB Login on AndroidTV

吃可爱长大的小学妹 提交于 2019-12-20 03:23:37
问题 Does anyone have any experience using the Facebook SDK to perform Facebook login on AndroidTV? Since it's most often the case that an AndroidTV user won't have the actual Facebook app installed on the AndroidTV device, the Facebook SDK will open a WebView to allow the user to enter his Facebook credentials and login. The issue is the webview that gets displayed doesn't respond to d-pad actions and the fields to enter text don't indicate they are selected. Am I to assume that Facebook login