Solved Is there any documentation available for Kodi Channels on the Android TV Launcher? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: Android Development (https://forum.kodi.tv/forumdisplay.php?fid=184) +---- Thread: Solved Is there any documentation available for Kodi Channels on the Android TV Launcher? (/showthread.php?tid=373827) |
Is there any documentation available for Kodi Channels on the Android TV Launcher? - izprtxqkft - 2023-07-19 I found this single post on how to create playlists that can be propagated to the home screen on android - https://forum.kodi.tv/showthread.php?tid=332589 But, not much more on the subject that I can find, I would like to detect when kodi is launched from this intent within the skin or a service addon so that kodi can act in a different way. Thanks for any links or info you can pass along. RE: Is there any documentation available for Kodi Channels on the Android TV Launcher? - izprtxqkft - 2023-07-19 with the lack of documentation i traced through this but i still dont see where it sets any variables that can be checked from an addon or the skin kodi receives an android intent android.intent.action.GET_CONTENT which is handled by https://github.com/xbmc/xbmc/blob/master/xbmc/platform/android/activity/XBMCApp.cpp#L1410 with the url in the data videodb://movies/titles/337?showinfo=true the servicebroker calls activatewindow https://github.com/xbmc/xbmc/blob/master/xbmc/guilib/GUIWindowManager.cpp#L779 which calls activewindow_internal https://github.com/xbmc/xbmc/blob/master/xbmc/guilib/GUIWindowManager.cpp#L795 and none of that helps me figure out when kodi is called from this intent vs normal user operation from within a kodi addon or in the skin RE: Is there any documentation available for Kodi Channels on the Android TV Launcher? - izprtxqkft - 2023-07-24 still dont see anywhere that there is a flag or variable set when this is called from an intent is this not the right place to ask for details on the code? i would have thought the development section would have been where to ask how the code functions ... RE: Is there any documentation available for Kodi Channels on the Android TV Launcher? - jjd-uk - 2023-07-24 Yes but we don't have a huge number of active dev's at the moment, and the only active regular Android contributor is not a Team member so I don't believe they visit here. If I remember rightly you have a FireTV device so going by https://github.com/xbmc/xbmc/pull/23177 I don't think it has the Android API for channels. In case you are not aware, when it comes to Android then there's also the JNI wrapper library which gives access to the Android API's at https://github.com/xbmc/libandroidjni RE: Is there any documentation available for Kodi Channels on the Android TV Launcher? - izprtxqkft - 2023-07-24 (2023-07-24, 17:09)jjd-uk Wrote: Yes but we don't have a huge number of active dev's at the moment, and the only active regular Android contributor is not a Team member so I don't believe they visit here. If I remember rightly you have a FireTV device so going by https://github.com/xbmc/xbmc/pull/23177 I don't think it has the Android API for channels. thank you i do have firetv primarily but im testing a rocktek with android 11/android tv launcher right now which gave me the unexpected behavior of propagating playlists from kodi into the home screen launcher which is what brought this around, it opens kodi and shows the information dialog for the video - https://github.com/xbmc/xbmc/blob/master/xbmc/platform/android/activity/XBMCApp.cpp#L1421 the call android is making to kodi is the equivalent of issuing an adb command - adb shell am start -n org.xbmc.kodi/.Main -a android.intent.action.GET_CONTENT -d "videodb://movies/titles/337?showinfo=true" and originates somewhere here - https://github.com/xbmc/xbmc/blob/master/tools/android/packaging/xbmc/src/XBMCJsonRPC.java.in spending time back tracing this i dont believe it sets anything in kodi that is detectable within kodi what the desired behavior would be is to have a variable set that can be used within skins or addons like System.StartupWindow maybe this - have a System.StartupMethod which could be "from intent" or empty when the user has executed kodi then a System.StartupIntent set to "android.intent.action.GET_CONTENT" and a System.IntentData set to "videodb://movies/titles/337?showinfo=true" so that when called in this way it is possible to create more actions from an addon or the skin and bridge the gap between android and kodi RE: Is there any documentation available for Kodi Channels on the Android TV Launcher? - izprtxqkft - 2023-07-24 i suppose the end goal might shed light on this it would be preferable to have the action taken user configurable instead of defaulting to showinfo, i made some modifications to a custom build here https://github.com/xbmc/xbmc/blob/master/xbmc/platform/android/activity/XBMCApp.cpp#L1427 i changed the if clause to only require showinfo=true to be present and set to true in order for the resulting action to be "showinfo" if (targeturl.GetOption("showinfo", value) && value == "true") we are already only acting on intents GET_CONTENT and action.VIEW due to the if clause above it so when issuing the same intent without showinfo=true, requiring both showinfo and the param true it performs the show information function as it used to omitting showinfo=true it falls to the else here - https://github.com/xbmc/xbmc/blob/master/xbmc/platform/android/activity/XBMCApp.cpp#L1450 now we can start playback using - am start -n org.xbmc.kodi/.Main -a android.intent.action.GET_CONTENT -d "videodb://movies/titles/337?showinfo=false" or am start -n org.xbmc.kodi/.Main -a android.intent.action.GET_CONTENT -d "videodb://movies/titles/337" (instead of showing info) i made 1 more modification here to resume playback instead of asking, again should be user configurable but since im building it im the user and using my preference - https://github.com/xbmc/xbmc/blob/master/xbmc/platform/android/activity/XBMCApp.cpp#L1456 item->SetStartOffset(-1); //STARTOFFSET_RESUME i wasnt sure what to include to get the constant so i just hard coded it and noted its intended constant name now if i can figure out how to detect this operation i would like the skin (Estuary) to be able to skip the home screen from Startup.xml if we are automatically starting playback so, Startup.xml becomes this -
at this point the decision can be made by VideoFullScreen.xml to return to the Home window or simply Quit() kodi when playback stops, returning instead to the android Home - assuming it was started from the intent as soon as i figure out how to introduce a variable like startupintent i should have this working - in my own copy RE: Is there any documentation available for Kodi Channels on the Android TV Launcher? - Dukar - 2023-07-31 (2023-07-19, 01:18)jepsizofye Wrote: I found this single post on how to create playlists that can be propagated to the home screen on android - https://forum.kodi.tv/showthread.php?tid=332589 For detecting when Kodi is launched from an intent on Android, refer to the provided Kodi forum thread. Further information or links on this specific subject may require additional research or consulting Kodi's official documentation and support channels. RE: Is there any documentation available for Kodi Channels on the Android TV Launcher? - Klojum - 2023-07-31 (2023-07-31, 08:45)Dukar Wrote: For detecting when Kodi is launched from an intent on Android, refer to the provided Kodi forum thread. Further information or links on this specific subject may require additional research or consulting Kodi's official documentation and support channels. What a load of generic useless crap... Stop 'reviving' old forum threads with apparent short AI/GPT texts that no one really wants, or the forum mods will find their nuke-a-forum-user button pretty quickly. RE: Is there any documentation available for Kodi Channels on the Android TV Launcher? - izprtxqkft - 2023-07-31 Solved* No more replies needed, especially non-sense ones like from Dukar |