//Called when application is started.
function OnStart()
{
//Sets theme
theme = app.CreateTheme( "Light" );
theme.SetTextColor( "black" );
app.SetTheme( theme );
//Create a layout with objects vertically centered.
lay = app.CreateLayout( "linear", "VCenter,FillXY" );
//Create a text label and add it to layout.(Gets stats from sys on devices /)
BatT = app.CreateText("Battery Temp " + app.ReadFile("/sys/class/power_supply/battery/batt_temp" )/10 + " Degrees");
BatT.SetTextSize( 20 );
lay.AddChild( BatT );
//Create a text label and add it to layout.
BatH = app.CreateText("Battery Health " + app.ReadFile("/sys/class/power_supply/sec-fuelgauge/health" ));
BatH.SetTextSize( 20 );
lay.AddChild( BatH );
//Add layout to app.
app.AddLayout( lay );
}
//Called when application is started.
function OnStart()
{
//Sets theme
theme = app.CreateTheme( "Light" );
theme.SetTextColor( "black" );
app.SetTheme( theme );
//Create a layout with objects vertically centered.
lay = app.CreateLayout( "Linear", "VCenter,FillXY" );
//Create a text label and add it to layout.(Gets stats from sys on devices /)
BatT = app.CreateText("Battery Temp " + app.ReadFile("/sys/class/power_supply/battery/temp" )/10 + " Degrees");
BatT.SetTextSize( 20 );
lay.AddChild( BatT );
//Create a text label and add it to layout.
BatH = app.CreateText("Battery Health " + app.ReadFile("/sys/class/power_supply/battery/health" ));
BatH.SetTextSize( 20 );
lay.AddChild( BatH );
//Add layout to app.
app.AddLayout( lay );
}