Invalidate getMyRandomProvider then create new MyRandom from getMyRandomProvider. It is simple, it can work with a thread to update random values, and widgets rebuild when a new data is provided.
Read steps for more details.