sal0max / muzei-nationalgeographic

The National Geographic photo of the day for Muzei.
GNU General Public License v3.0
39 stars 7 forks source link

Update to Muzei API 3.4, fixing actions on Android 10+ #10

Closed ianhanniballake closed 4 years ago

ianhanniballake commented 4 years ago

Use the new getCommandActions() API to fix the 'About this photo' and 'Share this photo' actions on Android 10+ devices. By keeping the old APIs as well, we maintain backward compatibility with Muzei 3.3 users (although the actions still won't work for those users who are running Android 10+ - they'll still need to upgrade to Muzei 3.4).

The NationalGeographicWorker was changed to be compatible with the Kotlin rewrite of the Muzei API and use the reified version of getProviderClient() to avoid the ::class.java stuff that was previously required.

Muzei API 3.4 requires Kotlin 1.3.72 and a compileSdkVersion of 30 (which then required we upgrade the Android Gradle Plugin to 4.0.1), so those were also updated.

sal0max commented 4 years ago

Thanks so much for the fix! Keep up the awesome work on Muzei! :)