egeniq / android-tv-program-guide Goto Github PK
View Code? Open in Web Editor NEWAndroid TV Program Guide
License: Apache License 2.0
Android TV Program Guide
License: Apache License 2.0
Hello! Just want to say, thank you for this great library. I'm forced to ask help here, because I have tried everything and no luck with this one. I have modified a little library and added function which will update row by row and that is working fine, but problem is that when update is finished, timeline is scrolled at the beginning. I will show you my code:
fun updateData(reverse: Boolean, count: Int) {
val channelCount = programManager.channelCount
if (!reverse) {
for (i in (channelCount - count) until channelCount) {
val listAdapter = ProgramGuideListAdapter(context.resources, programGuideHolder, i)
if (reverse) {
programListAdapters.add(0, listAdapter)
notifyItemInserted(0)
} else {
programListAdapters.add(listAdapter)
notifyItemInserted(programListAdapters.size)
}
}
} else {
for (i in count - 1 downTo 0) {
val listAdapter = ProgramGuideListAdapter(context.resources, programGuideHolder, i)
if (reverse) {
programListAdapters.add(0, listAdapter)
notifyItemInserted(0)
} else {
programListAdapters.add(listAdapter)
notifyItemInserted(programListAdapters.size)
}
}
}
}
Also I have tried to comment this functions updateTimeline()
, autoScrollToBestProgramme()
, but no luck.
Hi,
I'm trying to focus the specified program from programId.
I get child view from recyclerView of ProgramGuideRowGridView
and requestFocus it, but child view is null.
Can you tell me how can I focus the specified program?
Hi egeniq
Can you please share the same app and library in java?
Thanks in advance
@dzolnai How can we achieve in scrolling the program info like in the below screenshot when duration is long. With just program title and time, its working fine. With images, content is not scrolling as expected. can you pl. help in achieving this
Thanks
Hi Sir,
I need to set that timeline time in 12 hours format how can I do this?
You did a great job.
I can see , this code is built using Kotlin, but I am really not good at Kotlin.
Do you have the same code in Java?
Please let me know.
Thanks. Shang.
Hello, I want to go to a specific channel when EPG fragment is opened (scroll to that channel), how can I achieve this?
Regards.
Hello,
I wanted to ask if it is possible to make the channel image focusable. What i want is to make channel detail more accesible, so when i go all way left, access the channel by clicking the image.
Thanks,
Joaquín.
Hello,
I am facing the issue when setting the time in timeline row from 12:00 AM to the end of the day at 23.59PM.
Could anyone please suggest how to do this?
as I already changed the parameter of "
private const val DAY_STARTS_AT_HOUR = 1
private const val DAY_ENDS_NEXT_DAY_AT_HOUR = 2" in "ProgramGuideManager" file but no effect reflection is visible.
I have added my live data inside that so because this start time issue, I am not able to show the correct current program.
It will help me a lot if anyone can help me.
Thanks in advance.
Hi , I checked you sample and when I feed the API data to it doesnt scrolls. Could you please let me know what all the key areas that I need to make changes to make it work. I followed @Upddating EPG issue link and made change but couldn't get through.
Would you consider adding android-tv-program-guide to the official F-Droid repository?
This way people would see it and can get updates easily.
There's also some documentation on what is allowed but I guess it should be fine as long there are no proprietary extensions.
It's possible to create a RFP on the F-Droid GitLab repository.
I only found TVHguide but android-tv-program-guide seem to be missing.
In some cases for iptv, server may not support getting all epg data in one request, the data is huge for iptv providers who provides a few thousands of channels. Instead, they support getting epg channel by channel. In our current solution, we have to set data in advance, can we have a function e.g.
fun updateData(channelId: String, programList: List<ProgramGuideSchedule<T>>)
which only updates the channel's epg data and add:
notifyScheduleUpdated(channelId: String)
in the listener that only one row of data is updated?
Hi Sir,
i removed day filters and added 3 filter buttons, on clicking each button will fetch different data from api and I passed required values to createschedule method and it is working fine, but here my problem is how i can load the new schedule list data to adapter.
Hello @dzolnai
I'm integrating your library with my application and I've found an issue with timeline row. It is reproducible in demo application.
In the method EpgFragment.onScheduleClicked()
I'm opening a new fragment (it can be blank fragment) using this code:
val transaction = activity?.supportFragmentManager?.beginTransaction()
transaction?.replace(R.id.fragment_container, BlankFragment())
transaction?.addToBackStack("blank")
transaction?.commit()
It opens the new blank fragment (in my app this is fragment with asset details). Then I want to return to EpgFragment
by pressing back button. When I do this, the timeline on EpgFragment
is moved by 4.5 hours and also programguide_current_time_indicator
has a wrong position. For other DISPLAY_TIMEZONE setting, the time difference is different, but always not correct. I attached the screenshots to show this behaviour.
BEFORE (House of Cards starts at 11:09 and this is correct on the timeline)
AFTER BACK BUTTON PRESSED (House of Cards starts at 11:09 but on the timeline it starts at 6:39)
Hi,
many thanks for developing this library!
I'm trying to build a release version of the library but Android Studio say's the constructor of Handler is deprecated and refuses to compile. Although it works in debug... Not sure if I'm doing something wrong here... :)
Here's the error message from Android Studio:
w: C:\AndroidProjects\android-tv-program-guide-master\library\src\main\java\com\egeniq\androidtvprogramguide\util\WeakHandler.kt: (54, 24): 'constructor Handler()' is deprecated. Deprecated in Java
Hi,
I was not able to get the current channel name or channel position on the EPG fragment. Can you please help me resolve this issue?
Thank you for your great work, the guide is excellent.
I want to know if it possible to display the stream instead of the image at the bottom of the screen on the left onScheduleSelected ?
is there a way to do it?
Hi Dániel Zolnai,
Is Android TV Program Guide Project available in Java language...???
Hello again,
We are getting some crashes on Firebase, so I was wondering if someone else also got this error. Below is the log from Firebase:
Fatal Exception: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 7(offset:7).state:20 com.egeniq.androidtvprogramguide.row.ProgramGuideRowGridView{a496714 V.ED..... ......ID 0,0-1920,135 #7f0b01fa app:id/row}, adapter:com.egeniq.androidtvprogramguide.ProgramGuideListAdapter@bc62826, layout:com.egeniq.androidtvprogramguide.timeline.ProgramGuideTimelineGridView$1@6fedc67, context:rs.maketv.lakitv.leanback.activities.HomeActivity@fd690bd
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6183)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
at androidx.recyclerview.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1391)
at androidx.recyclerview.widget.LinearLayoutManager.scrollHorizontallyBy(LinearLayoutManager.java:1116)
at androidx.recyclerview.widget.RecyclerView.scrollStep(RecyclerView.java:1838)
at androidx.recyclerview.widget.RecyclerView.scrollByInternal(RecyclerView.java:1940)
at androidx.recyclerview.widget.RecyclerView.scrollBy(RecyclerView.java:1812)
at com.egeniq.androidtvprogramguide.ProgramGuideFragment.onHorizontalScrolled(ProgramGuideFragment.kt:431)
at com.egeniq.androidtvprogramguide.ProgramGuideFragment.access$onHorizontalScrolled(ProgramGuideFragment.kt:63)
at com.egeniq.androidtvprogramguide.ProgramGuideFragment$setupComponents$onScrollListener$1.onScrolled(ProgramGuideFragment.kt:320)
at androidx.recyclerview.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:5173)
at androidx.recyclerview.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5338)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
at android.view.Choreographer.doFrame(Choreographer.java:603)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5422)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Hello,
Thanks for this amazing library.
I want to change the distance between hours. I am facing the issue when changing "programguide_table_width_per_hour" in dimen values from 300dp to 80dp. I find that progress of some programs is not working properly with current time.
Can you guys tell me how can I fix this issue?
Thanks & Regards.
Hi Sir,
the current program is not showing when opening the epg, which means that the program is scrolled to the left side with timeline and it is not visible. we have to use remote to navigate back to current program.
how to fix this problem?
Can I use an XMLTV url data source? If yes, where in the code can I insert this url to parse the data?
Hi,
I'm looking for a way to scroll the center Program Guide Grid when move from right to left. Can you guys tell me how to do it?
Also there is a variable in ProgramGuideGridView
I don't understand yet is overlapStart
in line it.overlapStart = it.resources.getDimensionPixelOffset(R.dimen.programguide_channel_column_width)
. Can you explain to me what it is, please?
Thanks & Regards.
Hi @dzolnai getting this issue which seems like focus got lost but , program cell is focused behind the channel bar.
Please refer the shared video and let me know what can be the cause of this.
Hello Daniel,
After resolving the previous issues for mobile device with your guidance. I encountered with an another issue.
Here, when we scroll programs from right to left then it works perfect but they are still visible or go through channel row.
Image:- https://raw.githubusercontent.com/egeniq/android-tv-program-guide/master/documentation/demo_overview.png
Video:- https://raw.githubusercontent.com/egeniq/android-tv-program-guide/master/documentation/scrolling.gif
Here, shows are still visible under the channel row. I applied margin and padding in different xml and classes but failed. Kindly, can you help me to resolve this. @dzolnai
Thanks & Regards,
Hi, Sir Thank you for your contribution.
I am new to this android TV development, I know java I don't know kotlin, I modified your UI according to my requirement but now the timeline and current time are not syncing. can you help me to solve this issue, in the program you are using hardcoded data can you provide one example of how to get data from API to the program in kotlin for this EPG program?
Hi,
I found the issue when I am trying to change date to 3-4 days after the current date. I am not able to focus the Programs grid. And after switching amount dates sometime I am not even able to focus the program guide of current date as well.
I am using Xiaomi MIBOX3 with Android 9.
In my app there is toolbar at top so when I open the activity first time focus goes to the Search icon & then goes down to the particular current program with focus .But I want initially focus goes to current program not to the Search icon on toolbar.
Force RTL
Can you guys tell me how can I fix this issue?
hi @dzolnai
When navigating through the programs using up and down, current time range programs is not focusing instead previous or future programs are focusing. Pl. find the video attachment
https://user-images.githubusercontent.com/8926002/214213070-e7168c5f-9a9f-498a-8d7a-e6c5515e5095.mp4
Can you pl. help me in resolving this. Thanks in advance
Hi again,
I'm currently using the library from a Android TV project written in Java.
So far I'm able to show the ProgramGuideFragment inside my Android TV project and I'm now populating the channels and schedule. I believe I have to call setState(State.Content) in order to have the ProgramGuideFragment show the data (I'm also before this calling SetData)?
But it seems as if I'm not able to call setState(State.Content) or setState(State.Loading) from my Fragment which inherits from the ProgramGuideFragment.
error: cannot find symbol setState(State.Content); (this compile error is shown when trying to compile my code)...
Perhaps I'm doing something wrong here? :)
Kind regards
/Mattias
I am a Tv Player app developer. My senior developer told me that your epg format is very suitable for use in a tv app, and it will be written in java, so I tried to refer to your project. But it was code written in your Kotlin. Did you refactor the project that was implemented in Java through an update? If so, is there any way to refer to the project source of the previous Java version? It seems that there is no case other than you that implemented timeline and viewgroup control that changes according to time through Leanback. I would like help
Hi,
Omn opening of EPG When ever I try to focus the short program for a specific channel, focus is moving to next program.
Pl. help me in resolving this
hi @dzolnai
While scrolling programs right, once the next programs are loaded and on focus, date is not getting updated immediately. Date is getting updated after scrolling some more programs.
Please find the video for reference.
https://drive.google.com/file/d/1pxJBTlT22q2zCFt0vFbsLu57ujr92YPC/view?usp=sharing
Request your help to know how it can be fixed
Hello @dzolnai,
I think this is a bug that appeared when I changed some parameters in the original demo.
DAY_STARTS_AT_HOUR
to 0, DAY_ENDS_NEXT_DAY_AT_HOUR
to 6.val MIN_SHOW_LENGTH_SECONDS = TimeUnit.MINUTES.toSeconds(5)
val MAX_SHOW_LENGTH_SECONDS = TimeUnit.MINUTES.toSeconds(60)
I have tested on real device and an emulator. Real Device: Sony Bravia 4K GB ATV3 (Android version 8.0.0) + emulator(Android TV 720p API 27)
how we can add click listener on channel list when click on any channel get the channel object
Hi, I am facing problem with manage focus in program view. When our program guide screen is going to start, I want default focus on current time program. When user scroll up and down, focus will move only current time program. This time when I launch the app the default program is selected either 1 or 2 hours later or earlier.
Hii there,
All thanks for this awesome library. The library is for a best use for tv program, but it is also working in mobile device for channel view. Now the issue,
1.) I am facing the issue is whenever I do a horizontal scroll to shows of any individual channel then it will scroll that particular channel and not scrolling whole gridview. Now I want to make a scroll to whole gridview even if I scroll any individual channel horizontally.
2.) "Jump to live" button works properly in tv UI but if we scroll horizontally and at the same time if we press the button then after that it will not navigate us to the live programs.
Any guidance will be appreciable.
.
Hi,
Thanks for this amazing library. It works perfect for me. I just needed to check that if there is any possibility that we can load data on scroll rather than we just all the EPG data at once.
My current scenarios is that I need to load epg for Next 7 days but that takes a lot of time to populate. So Can you please help me with that how can I load the epg day by day as soon as that's available from API.
Thanks in advance.
Hello @dzolnai,
Can we add support for the channel page switching with the channel up/down key? On TV remotes, increments/decrements the EPG channel. So if u see channels 1-5 now when u press channel down you should show channel 6-10.
Thanks.
Hi Sir,
you are passing nextTime and endTime in 2023-04-04T13:23:35Z this format.
in my case i am getting 2023-04-04T10:32:05+05:30 this format but i am not able to parse this format to your format can you please suggest how can i parse my data?
Hi,
I hope you are doing well,
I'm using your EPG library but facing a problem in getting yesterday's data. I just commented on the filter part (setup filters method) because that is not needed in my project. I need only three days yesterday, today, and tomorrow data for programs with single scrolling only but unable to find the where to make a change in the program guide fragment. Can you please help me to resolve this?
Hi. My dear friend,
I am trying to convert kotlin to java.
Do you have same code in java (android) platform?
From last 1-2 month i am searching for the same but still not getting any proper solution.
Stuck totally. Please help me for the same. If you have any idea pls share with me,
[email protected]
Hii,
First of all thanks for this amazing library. It works well. Currently, I am using this library & facing an issue in channel view that all the channels listed well. But the shows which are listed horizontally in a particular channel are in random format. I tried to check the function in the collection class as well as I tried to set a loop inside the while-loop which maps the channel with shows but failed. I got stuck over there so can you help me to find the way that how can i get the horizontal shows list in a format from api call and not in random format. Any help will be appreciable.
Hello Daniel,
Again I am here to bother you :) Here I want to know that is there any way to highlight the channel block.
Explanation:- When we navigate the shows using remote it will highlight it and informs the user that at which show the cursor or remote controller is. Same ways if we scroll vertically then again the remote controller movement and selected shows highlighted. Now during vertical scroll, I want to highlight the channel also that currently, which channel is selected.
Image:- https://drive.google.com/file/d/1y9It6Gvi1TjLxrWEEvELrYw402hl_yKD/view?usp=sharing
Thanks & Regards,
Nikhil,
Hi,
Can we set the current program focused when ever we open the EPG without scrolling and focused.
jumpTo method is scrolling. For my project requirement, it should be focused without scrolling.
Thanks
Hi, I just cloned the repo and loaded the project in Android Studio. When I try to run the demo I get the following error during build.
Cannot create service of type TaskExecuter using ProjectExecutionServices.createTaskExecuter() as there is a problem with parameter #16 of type ReservedFileSystemLocationRegistry.
> Cannot create service of type ReservedFileSystemLocationRegistry using ProjectExecutionServices.createReservedFileLocationRegistry() as there is a problem with parameter #1 of type List<ReservedFileSystemLocation>.
Hello,
Is it possible to extend progress to shows which are in past? Currently you can see progress on current shows, but I would like to make progress visible also on shows which are in past.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.