You are here: Forum Home → ANT Developers Forums → ANT+ FIT Forum Has Moved → Thread
public class GCListener implements MonitoringMesgListener
{
public GCListener()
{
try
{
Decode decode = new Decode();
MesgBroadcaster mesgBroadcaster = new MesgBroadcaster(decode);
FileInputStream in = new FileInputStream("act.fit");
mesgBroadcaster.addListener((MonitoringMesgListener) this);
mesgBroadcaster.run(in);
in.close();
}
catch (Exception e)
{
e.printStackTrace();
}
}
@Override
public void onMesg(MonitoringMesg mesg)
{
System.out.println("monitoring");
System.out.println(mesg.getActiveTime());
}
}
foobar:testFitSDk andi$ java -jar FitMonitoringReaderExample.jar act.fit 86000
Decoded monitoring data from act.fit to at 86000s intervals.