'Self update on android without play services

How do I make my sideload only android app check for updates on every launch For example make it go to example.com/latest.txt and compare the versions and then download it Or another solution that doesnt involve play services. I've tried looking this question up but didn't find anything of use



Sources

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

Source: Stack Overflow

Solution Source