Android app – keep screen on while charging, turn off after 30 mins when unplugged

Job ID: 39415361

Budget: $30 – $250 USD

Hi,
I’m looking for a developer who can add a small feature to my existing Android app. The app displays ads on a tablet, and I need a simple functionality that does the following:
• Keeps the screen ON only when the tablet is charging
• If the tablet is unplugged, the screen should turn off after 30 minutes of inactivity
• When the tablet is plugged back in, the screen should automatically turn back ON

The goal is to save battery when the tablet is not connected to power, without interfering with the ad display when charging.

The app is already developed and working. I just need this small addition.
Please let me know:
– If you’ve done something similar before
– What language or tools you would use
– How long it would take
– Your estimated cost

Looking to get this done quickly and efficiently.

Thanks!