It looks like you're new here. If you want to get involved, click one of these buttons!
I'm making an Android app (can't publish it to Play Store because my parents won't let me pay the developer fee) and so, I want the users to be able to check for app updates from within the app.
I have thought of my own way for that because I wasn't able to implement the other ways I found on the internet.
I've set a custom User Agent to the app "Broken Hearts/1.0". That's working fine as of now, as when websites are loaded from the app they're displaying that custom user agent. I'll be updating the User Agent of the app with every version (for example, app version 2.0 will have the User Agent "Broken Hearts/2.0").
So, whenever a user will check for update, the app is going to load "https://app.brokenhearts.ml/check-update.html" in the webview (with the User Agent "Broken Hearts/1.0"). Now when that's the latest update, I won't have added any special .htaccess rules to redirect it and so, the app will normally load "https://app.brokenhearts.ml/check-update.html". But, suppose I release v2.0, the users still on v1.0, will still be having their user agents set to "Broken Hearts/1.0", and thus, when checking for the update, they shall be redirected to "https://app.brokenhearts.ml/updated.html".
So, basically, whenever I release an update to the app, I'll be updating its User Agent and changing the .htaccess to redirect the users from the old user agent to the "download update page". So, users from any other user agent should remain unaffected and should be able to load the "version checking page" normally.
All of this is going to be based on User Agent and .htaccess. I think it's possible, however, I'm just not able to make the correct .htaccess code.