Watch gets into reboot loop when I download my app #437
-
The watch is an Amazfit Balance. My app (mini program, widget, service) works fine in the emulator. I scan the QR code to download it to the phone. That seems to work. When I try to enable the widget (via the app on the phone) the screen goes black. I reboot the watch and the two logos come up and then it reboots itself. Then I have to do a hard reset to get it working again. That takes aaggeess. I guess the problem is with the widget code which I have included below. there are 4 UI elements on the screen which are ceated in the onInit and recreated in the onResume. I found the widget was not updating automatically when you went back to it, so I was forcing it to do it manually. The mini program pauses for a second when i launch it and then reboots the watch. I can share the code if you want.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I can only share my experience. I declare the widgets that need to be changed as global, just like you. But I don't delete them, I just change the text or their position. Your widget parameters are passed as functions. There may be an error in these functions. To check, you can replace these functions with a static set of parameters. However, the parameters in build() and onResume() must be different. This way, you will see if the widget is created and if the data in it is updated. |
Beta Was this translation helpful? Give feedback.
-
Eventually got it working. It was nothing to do with the widgets. It was an alarm I set up when the app started. |
Beta Was this translation helpful? Give feedback.
Eventually got it working. It was nothing to do with the widgets. It was an alarm I set up when the app started.