-
-
Notifications
You must be signed in to change notification settings - Fork 126
Add Wallpapers
Frames can fetch wallpaper data from a JSON file.
New to JSON?
Read the tutorial to get started.
A parent array houses wallpaper objects, which require two key–value pairs: name
and url
. Seven more are accepted.
[
{
"name": "First Wallpaper",
"url": "https://www.example.com/first-wallpaper.png"
},
{
"name": "Second Wallpaper",
"url": "https://www.example.com/second-wallpaper.png"
},
{
"name": "Third Wallpaper",
"url": "https://www.example.com/third-wallpaper.png"
}
]
Wallpaper objects accept nine key–value pairs in total.
Key | Required | Data Type | Definition | Notes |
---|---|---|---|---|
name |
Yes | String | Wallpaper Name | |
url |
Yes | String | Wallpaper Image | Direct/raw URL |
author |
No | String | Wallpaper Author | |
thumbnail |
No | String | Thumbnail Image | Direct/raw URL |
collections |
No | String | Collections to Include In | Comma-Separated List |
downloadable |
No | Boolean | Allows Downloading | |
size |
No | Integer | File Size in Bytes | |
dimensions |
No | String | Image Resolution | |
copyright |
No | String | Licensing Information |
If you would like to store your wallpapers in your app instead of the cloud, you can do so by putting your files in the app/src/main/assets
folder, and setting the url to the following format: file:///android_asset/{file}
... where {file}
would be the path to the file under the assets folder.
Example:
File | URL (in JSON file) |
---|---|
app/src/main/assets/wallpaper.jpg |
file:///android_asset/wallpaper.jpg |
app/src/main/assets/folder/0.jpg |
file:///android_asset/folder/0.jpg |
Avoid using spaces or special characters for the files names.
Upload your JSON file online and obtain a direct URL to it. Overwrite the value of json_url
in /app/src/main/res/values/frames_setup.xml.
<string name="json_url">https://jahir.dev/frames/frames.json</string>
Copyright 2022 by Jahir Fiquitiva. This work is licensed under the CreativeCommons Attribution-ShareAlike 4.0 International License.