Hi! PexWallpapers is one of my current projects in Jetpack Compose. The app use Pexels.com image library to show pictures/wallpapers in the app. You can browse different categories or just use Search to find some beautiful wallpapers for your phone. If you add wallpapers to favourites than you can turn on Auto Wallpaper Setter in Settings, to have your phone wallpaper changed every specific period of time.
-
Tech Stack
- 100% Kotlin
- Coroutines - for background operations
- Retrofit - networking
- Jetpack
- Room - for persistence
- ViewModel - handles logic between UI and Repository using Flows
- Jetpack Compose - latest reactive ui toolkit by Google
- Paging 3 - for displaying long Wallpaper lists from web
- WorkManager - automation wallpaper change and downloading images
- Hilt - for dependency injection
- Coil - for fetching images from web
- Accompanist is used in a SwipeRefreshLayout
- Shimmer effect for while loading Wallpapers
-
Modern Architecture
- Modularity - feature layered
- Single activity
- MVVM architecture
- Android Architecture components (ViewModel Compose navigation)
- Android KTX - Jetpack Kotlin extensions
-
UI
- Material design
- Compose - reactive UI
-
Testing
-
Gradle
- displays daily wallpapers in ViewPager
- color categories in scrollable horizontal column LazyRow, click take you to Search screen, and starts search of color
- curated images from Pexels.com in scrollable vertical column
- every image can be added to favorites by long click
- clickable elements has pressed effect
- top bar expands and lets user leave feedback
- search feature
- every image can be added to favorites by long click
- clickable elements has pressed effect
- top bar expands and lets user leave feedback
- displays favorites in scrollable vertical column
- long click removes image from favorites
- top bar expands and lets user leave feedback
- displays image preview
- uses image cache form previous screen to speed up image loading
- long click adds/removes image from favorites
- top bar expands and lets user leave feedback
- action buttons:
- link to pexels.com
- download image - uses worManager task
- share image
- add to/remove from favorites
- set wallpaper button - lets user choose home or lock screen
- Notification settings
- push notifications
- new wallpaper set
- wallpaper recommendations
- Automation settings
- enable disable automation
- screen to change wallpaper
- animated time picker - days, hours, minutes
- save button - clears any previous automations, creates automation task for every favorite wallpaper
- Data saver settings
- download wallpapers only on Wi-Fi - part of workManager constraints
- Download miniatures in lower resolution - every screen checks this setting on launch
- Auto change only on Wi-Fi - every automation task checks this setting before launch
- Performance settings
- Shadows - every screen checks this setting on launch
- Parallax effect - home screen checks this setting on launch
- links (not fully implemented):
- About us page
- Privacy policy
- Support
- min time to select is 15 min
- minimum one screen has to be chosen
- creates task for every wallpaper
- constraints - low battery, no network, low storage
- backs up currently set wallpaper
- getting removed if notification is dismissed
- home screen
- lock screen
- or both
- BigPicture style
- Grouped notifications if more than one
- Interaction:
- Restore - restores previous wallpaper, and deletes backup
- Preview - click take you to preview
- Swipe off-screen - delete backup and cancels current task
There are a few ways to open this project.
Android Studio
->File
->New
->From Version control
->Git
- Enter
https://github.com/adrianwitaszak/PexWallpapers.git
into URL field an pressClone
button
- Run
git clone https://github.com/adrianwitaszak/PexWallpapers.git
command to clone project - Open
Android Studio
and selectFile | Open...
from the menu. Select cloned directory and pressOpen
button
-
git clone repo to Android studio
-
Get your own Api Key from Pexels.com
-
Add your own Api Key to gradle.properties in this format
pex_api_access_key="234f9170000324234012343d044b1a3482ba588"
-
And run in emulator or on physical device
Read our contributing guide and let's build a better antd together.
We welcome all contributions. Please read our CONTRIBUTING.md first. You can submit any ideas as pull requests or as GitHub issues. If you'd like to improve code, check out the Development Instructions and have a good time! :)
MIT License
Copyright (c) 2022 Adrian Witaszak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.