In my sony smartwatch2 app extension. I want to show a progress hud kind of a thing on a button click and perform some task in background. How can i show a progress hud on button click. I am able to get button click and able to perform task. But during execution i don't want user to click that button again and again.
Asked
Active
Viewed 132 times
1 Answers
1
To make a loading animation or a progress bar, you can use sendBitmap
or showLayout
methods in a loop, for example by a Timer
. In a reasonable delay, you can send updated UI with the current state of your process.

peter.bartos
- 11,855
- 3
- 51
- 62
-
Its working file but if user clicks on the watch back button he is able to see the previous layout is there any trick that i can disable that back button while background process is taking place. – kunal Oct 06 '14 at 07:21
-
You can listen to onKey event and provide your own implementation for keyCode == Control.KeyCodes.KEYCODE_BACK. For more info see here: http://stackoverflow.com/questions/19555150/sony-smartwatch2-hooking-back-key – peter.bartos Oct 06 '14 at 09:05