microg / GmsCore

Free implementation of Play Services
https://microg.org
Apache License 2.0
8.29k stars 1.7k forks source link

Auto-purchase free apps upon checking license #2375

Closed fynngodau closed 1 month ago

fynngodau commented 4 months ago

Adds support for auto-purchasing free apps, and adds preference to enable auto-purchasing. Inspired by the implementation in gplayapi. Fixes https://gitlab.e.foundation/e/backlog/-/issues/7949.

To keep the code readable, I did a major refactor and converted the code to be written in Kotlin and use coroutines (thanks to the now-existing HttpClient class). As positive effects, the licensing code is now much shorter, easier to understand due to its clearer logical flow and no longer visibly consists of loads of nested callbacks and recursive calls.

cc @jonathanklee