October 2017
Intermediate to advanced
294 pages
6h 49m
English
Another critical functionality from our EPG that we haven't covered yet is the ability to actually do something when clicking on a TV program. If we want to do something useful with our EPG, rather than just showing the titles of what is coming, we must implement this functionality.
This implementation is quite straightforward and will handle the logic to an external listener or callback. It would also be quite easy to modify the source code to implement some custom behavior on the EPG itself.
To begin, we create a new interface inside the EPG class with one single method:
interface EPGCallback {
void programClicked(Channel channel, Program program);
}
This method will be called whenever we click on a TV program, and ...
Read now
Unlock full access