you might be able to use HTTP as is (instead of connection being upgraded to HTTPS automatically) if you don't want to use HTTPS, with android:usesCleartextTraffic="true" property, added to the <application before the end >.
plus, the external API supports quite a lot of additional domains.
the exact amount is unclear, but I've collected a list of common short-links domains,
and simply try to see if the result has anything useful in it.
at the ResolveUrl:
change
"http://api.longurl.org/v2/expand?format=json&title=1&url="
to
http://unshorten.me/json/
(possibly avoid URL encoding, and removing https prefix too before).
and:
change
"long-url"
to
"resolved_url"
you might be able to use HTTP as is (instead of connection being upgraded to HTTPS automatically) if you don't want to use HTTPS, with
android:usesCleartextTraffic="true"
property, added to the<application
before the end>
.see https://unshorten.me/api
plus, the external API supports quite a lot of additional domains.
the exact amount is unclear, but I've collected a list of common short-links domains,
and simply try to see if the result has anything useful in it.
here is my list
edit: I've meant, in my web-extension (combine extraction-logic (offline), with external resolving using above API): https://github.com/eladkarako/chrome_extensions/tree/store/Remove-Redirects-Plus/README.md