In want display the Distance (from ActivityInfo) on my Watchface. It works, but in get the distance in cm. How can i change it to Km as float (z.B. 3,32)?
Here's how I do both miles and km's
if(settings.distanceUnits==Sys.UNIT_STATUTE) {
string=(activityInfo.distance/160934.0).format("%.2f")+" mi";
}
else {
string=(activityInfo.distance/(100000.0)).format("%.2f")+" km";
}
Here's how I do both miles and km's if(settings.distanceUnits==Sys.UNIT_STATUTE) { string=(activityInfo.distance/160934.0).format("%.2f")+" mi"; } else { string=(activityInfo.distance/(100000.0)).format("%.2f")+" km"; }
I get the message: Could not find symbol settings. Symbol Not Found Error
May i have to create a settings.xml first? But what schuld i type into the xml?
There's a bunch of useful stuff in device settings. That's where you can find things like 12/24 hr mode, the alarm count, notifications count., and bluetooth status. You may want to look there to see other things you want for your watchface.