i want to implement Wait indicator So it appear while my code is running in the background until it finish then the wait indicator disappear

Can any one help me