Debug is empty...
I heard that you need activity recognition permission.
If that's the reason, how?
My code looks like this:
function OnStart()
{
var check = app.CheckPermission( "Body" );
app.GetPermission( check )
lay = app.CreateLayout( "Linear", "VCenter,FillXY" );
txt = app.CreateText( "", 0.8, 0.3, "Multiline" );
lay.AddChild( txt );
app.AddLayout( lay );
sns = app.CreateSensor( "StepCounter" );
sns.SetOnChange( sns_OnChange );
sns.Start();
}
function sns_OnChange( x, y, z, time )
{
txt.SetText( "x=" + x + "\n y=" + y + "\n z=" + z );