Difference between revisions of "Tutorial: Development of a TvDataService"

From TV-Browser Wiki
Jump to: navigation, search
m
(Implementing)
 
(2 intermediate revisions by 2 users not shown)
Line 10: Line 10:
 
== Implementing ==
 
== Implementing ==
  
Develop a class that implements the <code>tvdataservice.TvDataService</code> interface.
+
Develop a class that extends the abstract class <code>devplugin.AbstractTvDataService</code>.
  
 
Notes:
 
Notes:
* To continue using TvDataServices of TV-Browser version 0.9.7 they have to inherit the abstract class AbstractOldTvDataServiceBridge (or implement the new interface).
 
* Instead of implementing the TvDataService interface directly you can also use the class <code>util.tvdataservice.AbstractTvDataService</code>.
 
 
* All methods of this class are called by the host application (i.e., TV-Browser) and thus constitute entry points of the plugin.
 
* All methods of this class are called by the host application (i.e., TV-Browser) and thus constitute entry points of the plugin.
 
* The class has to be contained in a package of the same name as the class in lowercase.
 
* The class has to be contained in a package of the same name as the class in lowercase.
Line 36: Line 34:
 
[[de:Entwicklung eines TvDataService]]
 
[[de:Entwicklung eines TvDataService]]
  
 
+
[[category:Development]][[category:TV data service]]
 
 
[http://www.gambling-online-theory.com/casinos-portal/casinos-games.html casinos games]
 
[http://www.casino-games-wiki.com/index.php/play_casino_games_games_online play casino games games online]
 
[http://www.fortune-slots.com/ slots online]
 
[http://www.casino-games-wiki.com/index.php/on_line_casino_games on line casino games]
 
[http://www.casino-games-wiki.com/index.php/casino_games_rules casino games rules]
 
[http://www.gambling-online-theory.com/casinos-portal/best-casinos-online.html best casinos online]
 
[http://www.slots-wiki.com/index.php/slots_hints slots hints]
 
[http://www.casino-theory.com/bingo-online/gambling-online-bingo.html gambling online bingo]
 
[http://www.gambling-online-theory.com/casinos/strategy-casinos.html strategy casinos]
 
[http://www.casino-games-wiki.com/index.php/casino_games_online casino games online]
 

Latest revision as of 22:25, 1 February 2015

The TV listings in TV-Browsers are loaded by special plugins we call DataServices. This allows us to add new channels to TV-Browser arbitrarily (). Die TV-Daten werden in TV-Browser über spezielle Plugins - wir nennen sie DataServices - geladen. Auf diese Weise läßt sich TV-Browser beliebig um weitere Sender erweitern (provided that someone has access to the listings and writes a corresponding DataService).

This tutorial describes the basic steps for developing a DataService. For further help we recommend the TvDataStarterKit and looking at the JavaDoc documentation of TV-Browser as well as the source code of the existing DataServices.

Setting up the development environment

Add the Jar file tvbrowser.jar (this can be found in the TV-Browser installation directory) to the Java class path.

Implementing

Develop a class that extends the abstract class devplugin.AbstractTvDataService.

Notes:

  • All methods of this class are called by the host application (i.e., TV-Browser) and thus constitute entry points of the plugin.
  • The class has to be contained in a package of the same name as the class in lowercase.

Creating the Jar file

Next, you need to pack the DataService into a single file, to make installing and providing it to other people simpler.

The following command creates the Jar file:

jar cvf MyTVDataService.jar mytvdataservice

Important: The name of the Jar file has to be identical to the class name (including the lowercase/uppercase letters).

Installation

Copy the newly created Jar file into the dataservice directory of your TV-Browser installation. Finally, restart TV-Browser and use your DataService by clicking Update... in the menu TV listings.