Hello,
I've been having trouble in building a watch face that gathers battery info. I even tried running the sample Weather Watch and even that sample did not work. Through trial and error, I finally discovered that the following lines of code in the sample's bind events are causing my problem...but I don't know why. This is from the Weather Watch sample wearable 2.3.2 code:
// tizen.time.setTimezoneChangeListener(function() {
// updateWatch();
// updateInformation();
// });
// Adds event listeners to update battery state when the battery is changed.
// battery.addEventListener("chargingchange", updateBattery);
// battery.addEventListener("chargingtimechange", updateBattery);
// battery.addEventListener("dischargingtimechange", updateBattery);
// battery.addEventListener("levelchange", updateBattery);
As you can see, I commented out the above lines and ran the WeatherWatch code, unchanged from the sample code, and it worked fine (except of course due to my comments it doesn't update the watch when the timezone has changed and doesn't update the battery level due to my having commented out the code.) The rest of the sample Weather watch works beautifully. But uncommenting these lines causes an error in the javascript. Any idea what's happening?
By the way, other samples, like the Digital Watch sample 2.3.2 has the same exact code as above and it works fine!