This shows you the differences between two versions of the page.
built_in:get_os_version [2015/03/29 22:41] stevegarman created |
built_in:get_os_version [2015/03/31 05:40] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== GetOSVersion ====== | ||
- | Sample code | ||
- | <code JavaScript AndroidVersion.js> | ||
- | var json = ' | ||
- | var allBuilds = JSON.parse(json); | ||
- | // | ||
- | function OnStart() | ||
- | { | ||
- | var osObj = allBuilds[app.GetOSVersion()] | ||
- | var osInfo = " | ||
- | osObj.codename + " | ||
- | osObj.level | ||
- | |||
- | // | ||
- | lay = app.CreateLayout( " | ||
- | |||
- | // | ||
- | txt = app.CreateText( osInfo, | ||
- | lay.AddChild( txt ); | ||
- | |||
- | // | ||
- | app.AddLayout( lay ); | ||
- | } | ||
- | |||
- | |||
- | </ |