here is logic how you able to do that
suppose you use firebase realtime database, there you store update= UpdateCompulsory /UpdateNotCompulsory / NoUpdate
whenever your app is open it run a background task to fetch the update value, if UpdateCompulsory then show a dialog that didn't cancel out, if UpdateNotCompulsory then cancellable dialog box and if NoUpdate then do nothing