When I use <tizen:category name="http://tizen.org/category/wearable_clock"/> in the config file, the event handler won’t work. The callback is never hit. Though when I remove the category from my config, the code works.
Is there a way to use hardware keys in a wearable_clock application?
In Gear or Tizen Wearable Emulator a “Watchface” plays the role of ‘Home Screen’. A ‘home screen app’ can’t have eventListeners for Hardware keys as the keys have different functions/works to do in that state. (For example: Home key (the lower button) opens the app drawer ). That’s why tizenhwkey eventListeners are not working for Watchface app.
Thank you for your suggestion! How is this code different than what I posted though? Does your watch face project have the wearable_clock category specified in it’s config?
After checked out you can’t use HW Back event on watch face. Use custom navigation instead like UI button. Watch face is not regular app. Most events don’t work like HW keys and scrolling gestures.
This code will work only in case regular app not watch face. My fault, I didn’t check in my code and wrote from memory. I was wrong. Again, HW events like Back don’t work in case watch face. It just can’t. Watch face is like home screen app.