The app Muzei (https://muzei.co/) has lots of plugins (https://play.google.com/store/search?q=muzei&c=apps). I would like you to create one in Java that uses the Flickr API and Android Awareness APIs. Familiarity in Retrofit, REST APIs, and the Android Awareness API are a must. App itself will have no launcher icon and no UI, and will act as a plugin for Muzei.
When the Art Source is selected, the finished app must:
- Attempt to get the user's location via the Fused Location API from Google Play Services
- If the location isn't granted, pop up dialog message saying it's required and ask again (loop until granted or cancelled)
- Start the initial refresh
When it's time for a refresh, the finished app must:
- Get current weather condition for user's location via the NWS JSON API v3 (happy to assist with this)
- Ask Flickr for photos for this location
- If there are, send them to Muzei
- If there are none, ask Flickr for photos with the same weather condition as the search string, but st a random location from the locations XML, then send to Muzei
I'd like delivered source that can compile against SDK 29, min API of 21, latest Gradle, and with as few external libraries as possible. Package name of tech.herzog.flicki. Also, I'd like it to be pretty easy to tweak the "title", "byline", and "source URL" parameters that Muzei is fed at the refresh... Different whether it's photos at the user's location or from an XML random location.
- The user installs Muzei and this proposed app
- They launch Muzei and choose this app as their Art Source
- This app runs the method whenFlickiIsSetAsArtSource()
- The app is now scheduled to run refreshWallpaper() every X minutes
Then, it searches Flickr for photos around that user matching that weather condition. It then randomized the list of photos and sends it to Muzei. If there are no photos of the weather condition around the user of the user's location, then pick a location
fake-locations.xml
below at random and search for photos at that location of the user's current weather condition.