When screen off block wifi and/or data for selected apps from access internet. And only allow while the screen is on .
Block internet access for selected app per time schedule like at night so we can allow YouTube to play music while other app block from access internet from 10pm till 7am .