User Activity

I want to use the same widget in five screens,for example:the digitalClock.I want all my screens can show the time.For now,i add five digitalClock in five screen and use handleTickEvent to update digitalClock.In this way,code repetition rate is high....
I add a user Widget on my screen,but when i set the modalWindow to visible there is something wrong happened.What I need is the following:
The chip is:STM32F429When I was using the downloaded QRcode program, I found that the program crashed. The use method is as follows: