'How to get notified when the internet connectivity is available when the application is in background without using broadcast receivers

I have an application in which need to do some operation when internet is available even if app is in background or not available in the recent list. I do not want to use broadcast receivers.

How can I achieve this.?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source