Ciao a tutti,
come sapete qui in Italia ci sono ben tre operatori (TIM, Vodafone e 3)

che offrono la mobileTV attraverso la tecnologia DVB-H.
Purtroppo tutti i cellulari DVB-H disponibili sono venduti "broadcast locked" (non e' quindi possibile guardare i programmi TV trasmessi da un operatore con il cellulare marchiato da un operatore differente semplicemente cambiando la SIM).
Credo che cio' sia realizzato attraverso la specifica applicazione che, dentro ogni cellulare brandizzato, gestisce la lista dei canali e l' ESG che viene inviato in broadcast da ciascun operatore. Se questo e' giusto, forse si puo' bypassare questa limitazione sviluppando un'applicazione J2ME "aperta" basandosi sulla specifica
JSR-272 ("Mobile Broadcast Service API").
Che cosa ne pensate ?
Qualcuno di voi ha gia' avuto a che fare con la JSR-272 su cellulari DVB-H
Grazie
Di seguito riporto un esempio di codice basato sulle API J2ME Mobile Broadcast Service
Code:
1. Identifying the underlying bearer, ESG spec used in the implementation:
import javax.microedition.broadcast.esg;
ServiceGuide esg = ServiceGuide.getDefaultServiceGuide();
MetadataSet spec;
MetadataSet[] speclist = esg.getSupportedMetadataSets();
for (int i = 0; i < speclist.length; i++) {
System.out.println("Metadata Specification: " +
speclist[i].getDescription());
// Check the class for the different types of spec; DVBH in this case.
if (speclist[i] instanceof CommonMetadataSet) {
// ....
}
}
2. Enumerate all the valid attributes in the specs:
ServiceGuide esg = ServiceGuide.getDefaultServiceGuide();
MetadataSet spec;
MetadataSet[] speclist = esg.getSupportedMetadataSets();
for (int i = 0; i < speclist.length; i++) {
Attribute[] attrs = speclist[i].getValidAttributes();
for (int j = 0; j < attrs.length; j++) {
// Eumerate the attributes and print out their long (proper) names.
System.out.println("Attribute: " + attrs[j].getName());
}
}
3. Find all the programs of a particular genre, then display it:
// Form the query
ServiceGuide esg = ServiceGuide.getDefaultServiceGuide();
Query q = QueryComposer.equivalent(CommonMetadataSet.PROGRAM_CONTENT_GENRE, "News");
// Because some programs of our interest may be updated asynchronously,
// we should also add a listener to make sure that we get updated
// on all the programs we are interested in.
// We'll go through this in Example 4.
try {
esg.addListener(new ProgramMonitor(), q);
} catch (QueryException qe) {
// invalid query
}
ProgramEvent programs[];
try {
// Find the programs
programs = esg.findPrograms(q);
for (int i = 0; i < programs.length; i++) {
// A custom function to display the program info
// Example 5.
displayProgramInfo(programs[i]);
}
} catch (QueryException e) {
}
4. Listen to program updates:
// Define my own program change listener for monitoring
// program updates.
class ProgramMonitor implements ServiceGuideListener {
public void serviceGuideUpdated(String event, ServiceGuideData esgdata, Object data) {
if (event == NEW_PROGRAM_LISTED || event == PROGRAM_CHANGED) {
// Display the new program
displayProgramInfo(esgdata);
}
else if (event == SERVICE_GUIDE_BULK_CHANGED || event == PROGRAM_DELETED) {
// We'll need to redo the queries and redisplay
// the programs. See Example 3.
}
}
}
5. Display "Generic" program information:
void displayProgramInfo(ProgramEvent p) {
ServiceGuide esg = ServiceGuide.getDefaultServiceGuide();
// Use the code in example 2 to find all the applicable attributes
// for a program.
MetadataSet[] speclist = esg.getSupportedMetadataSets();
Attribute[] attrs = speclist[0].getValidAttributes();
for (int i = 0; i < attrs.length; i++) {
// Since we do not know ahead of time what the type
// of the attributes are, we will need to test for
// them one by one with "instanceof".
// The following format* methods format and display the
// values in some meaningful ways in the GUI. They are
// left as exercise for the readers.
formatAttribute(attrs[i].getName());
if (attrs[i] instanceof StringAttribute) {
formatString(p.getValue((StringAttribute)attrs[i]));
}
else if (attrs[i] instanceof DateAttribute) {
formatDate(p.getValue((DateAttribute)attrs[i]));
}
// More...
}
}