Set Wallpaper From Your Google Photos Library

Learn how to get an image based on certain criteria and set it as a wallpaper

  1. joaomgcd
    When done, you'll be able to do something like this:


    IMPORTANT:
    Start by following steps 1-7 here but use the Google Photos API instead.

    To read photos from your photo album you should use the https://www.googleapis.com/auth/photoslibrary.readonly scope in step 5.

    STEP 1 - MAKE API HTTP REQUEST


    Code (Text):
    {
      "filters": {
        "contentFilter": {
          "includedContentCategories": [
            "LANDSCAPES",
            "CITYSCAPES",
            "LANDMARKS",
            "GARDENS",
            "FLOWERS"
          ]
        },
        "mediaTypeFilter": {
          "mediaTypes": [
            "PHOTO"
          ]
        }
      },
      "pageSize": 100
    }
    (i) You can make Google generate this JSON for you in this page. Basically make sure to include the content categories you need in the JSON above.
    • Accept the action and go back to the action list


    STEP 2 - READ RESULT IMAGES


    • Add an AutoTools JSON Read action to the task
    • Set the Json field to %http_data
    • Set the Fields to %baseurl()
    (i) This will make AutoTools get back an array of images from the result and put them in the %baseurl() array.


    STEP 3 - GET RANDOM IMAGE


    • Add an AutoTools Text action
    • Set the Text to %baseurl()
    • Set the Random Variable field to randomurl
    (i) This will make AutoTools pick a random value from the array and output it in the %randomurl variable


    STEP 4 - SET WALLPAPER FROM URL


    • Add an AutoTools Image action
    • Set the Wallpaper field to %randomurl=w2048-h1024
    (i) You have to include the maximum width (2048) and height (1024) in the url. You can use any numbers you want but these seem to be enough for phone wallpapers



    Done! Now every time you run the task a new random wallpaper from your search will be set!
    If you want you can create a profile that fires every 2 hours for example and runs this task so that the wallpaper is changed every 2 hours! :cool: