Skip to content

Setting up your wallpapers json file

Jahir Fiquitiva edited this page May 14, 2023 · 2 revisions

The wallpapers section uses a JSON file stored somewhere in the internet to load wallpapers. Here's the info you need to know to write or setup the JSON file.

JSON format

[
	{
		"name": "My wallpaper",
		"author": "Jahir Fiquitiva",
		"url": "https://www.mywebsite.com/wallpapers/my_wallpaper.png",
		"thumbnail": "https://www.mywebsite.com/wallpapers/thumbnails/my_wallpaper.png",
		"collections": "GRADIENT|ABSTRACT",
		"downloadable": true,
		"size": 345066,
		"dimensions": "1280 x 720 px",
		"copyright": "CreativeCommons Attribution-ShareALike"
	},
	{
		"name": "My other wallpaper",
		"author": "Jahir Fiquitiva",
		"url": "https://www.mywebsite.com/wallpapers/my_other_wallpaper.png",
		"thumbnail": "https://www.mywebsite.com/wallpapers/thumbnails/my_other_wallpaper.png",
		"collections": "Landscapes,Art,Material Design",
		"downloadable": false,
		"copyright": "CreativeCommons Attribution-ShareALike"
	}
]

Keywords explanation

Tag Mandatory? Description Possible values
name YES Wallpaper name Any text inside quotes ""
author NO Wallpaper author Any text inside quotes ""
url YES The full-size/hi-res wallpaper url Any url inside quotes ""
thumbnail NO A downscaled/low-res/compressed version of your wallpaper Any url inside quotes ""
collections NO The collections/categories where this wallpaper should be shown in Any text inside quotes "". Separate collections with comma (,)
downloadable NO Whether users can download the wallpaper or not (True means yes. False means no) true or false
size NO File size (Warning: size in bytes [1Mb=1024Kb, 1Kb=1024Bytes]) Number like 1234
dimensions NO Wallpaper dimensions with format width x height px Any text inside quotes ""
copyright NO It is always good to comply with licenses and copyright Any text inside quotes ""

Alternative keywords

Blueprint allows you to use other keywords for common tags:

Tag Possible keywords
Thumbnail url thumbnail, thumbUrl, thumb, url-thumb
Collections collections, categories, category
Dimensions dimensions, dimension

Wallpapers images from Assets

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.

Finishing setup

When you have your JSON file ready. Upload it somewhere on the Internet and get its raw link. Then add it to frames_setup.xml

And that's it! 😄

Clone this wiki locally