AutoTools Set Home and Lock Screen Wallpapers from different NASA images of the day

Learn how to get today's and yesterday's NASA images of the day and set them as wallpapers

  1. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    joaomgcd submitted a new AutoApps project:

    Set Home and Lock Screen Wallpapers from different NASA images of the day - Learn how to get today's and yesterday's NASA images of the day and set them as wallpapers

    Read more about this project...
     
  2. Mi34aL

    Mi34aL New Member

    Joined:
    Oct 23, 2015
    Messages:
    1
    Likes Received:
    0
    Would work even better if Nasa did Image of the Day the same everyday. Yesterday's (2016-10-17) is actually a video which doesn't have a field called hdurl, only an URL referencing youtube. Nothing though an if and end if can't solve.
     
  3. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    yeah, I agree :) Thanks for your feedback!
     
  4. R4V3N_2010

    R4V3N_2010 New Member

    Joined:
    Jun 22, 2016
    Messages:
    21
    Likes Received:
    3
    Is it only me or is there some one else who this task doesn't work after the api change? I have two apod task and no one is working anymore. Both are here from the Forum. The first one with AutoWeb was working couple of weeks. Since 3 days it's not working. Yesterday I treid this one here and I can't get it to work. Maybe you guys here can help me to get one of those to task work again.
    Any help are greatly appreciated
     
  5. autormali

    autormali Member

    Joined:
    Jul 4, 2016
    Messages:
    134
    Likes Received:
    22
    The image URLs becomes redirected on the NASA page. To fix it you need for this project, for each of the variables %hdurl and %urlyesterday do as below. Disregard actions numbers, this is from the another project - instead %url place %hdurl and %urlyesterday. Note that (important) in A16, in search field after Location:, after colon there is a space (not seen here).

    Code (Text):
    <check if image %url is redirected>
    A10: HTTP Get [ Server:Port:%url Path: Attributes: Cookies: User Agent: Timeout:10 Mime Type: Output File: Trust Any Certificate:Off ]
    <if image %url is redirected>
    A11: If [ %HTTPR ~ 302 ]
    A12: For [ Variable:%header Items:%header() ]
    A13: Variable Add [ Name:%item Value:1 Wrap Around:0 ]
    A14: Variable Set [ Name:%hraderwithlocationurl
    To:%item
    Recurse Variables:Off Do Maths:Off Append:Off ]
    If [ %header(%item) ~ *Location* ]
    A15: End For
    A16: Variable Search Replace [ Variable:%header(%hraderwithlocationurl)
    Search:Location:
    Ignore Case:Off Multi-Line:Off One Match Only:On
    Store Matches In: Replace Matches:On Replace With: ]
    A17: Variable Set [ Name:%url To:%header(%hraderwithlocationurl) Recurse Variables:Off Do Maths:Off Append:Off ]
    A18: End If
     
    Last edited: Dec 26, 2016
  6. Peterg

    Peterg New Member

    Joined:
    Mar 11, 2017
    Messages:
    1
    Likes Received:
    0
    This project works well. I am just discovering that the size of the images may cause stability problems for the phone.
    Also I would recommend getting a key from NASA. It only takes a few seconds and makes a big difference.
     
  7. scotts

    scotts Member

    Joined:
    Jun 19, 2015
    Messages:
    140
    Likes Received:
    1
    I'm getting the following error when attempting to use the wallpaper function...

    java.lang.SecurityException: Permission Denial: opening provider com.android.providers.media.MediaDocumentsProvider from ProcessRecord{230ab45 14451:com.joaomgcd.autotools/u0a211} (pid=14451, uid=10211) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS

    Sent from my SM-G935V using Tapatalk
     
  8. scotts

    scotts Member

    Joined:
    Jun 19, 2015
    Messages:
    140
    Likes Received:
    1
    I attempted allowing permission...
    adb shell pm grant com.joaomgcd.autotools android.permission.MANAGE_DOCUMENTS
    Operation not allowed: java.lang.SecurityException: Package com.joaomgcd.autotools has not requested permission android.permission.MANAGE_DOCUMENTS
     
  9. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Sorry for the trouble. Do you also get that if you try to set the wallpaper to a direct URL?
     
  10. scotts

    scotts Member

    Joined:
    Jun 19, 2015
    Messages:
    140
    Likes Received:
    1
    Nope. Just tested, works fine via URL.

    Sent from my SM-G935V using Tapatalk
     
  11. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    What's the path to the local file you were trying to use?
     
  12. scotts

    scotts Member

    Joined:
    Jun 19, 2015
    Messages:
    140
    Likes Received:
    1
    This is what's down in the app...

    content://com.android.providers.media.documents/document/image%3A11688


    Sent from my SM-G935V using Tapatalk
     
  13. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Ok, that's probably why. Content URLs like those can't be used directly unfortunately. Is that a local image on your device?
     
  14. scotts

    scotts Member

    Joined:
    Jun 19, 2015
    Messages:
    140
    Likes Received:
    1
    Yes it is. What should the URL look like?

    Sent from my SM-G935V using Tapatalk
     
  15. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
  16. scotts

    scotts Member

    Joined:
    Jun 19, 2015
    Messages:
    140
    Likes Received:
    1
    Path, using Dual File Manger XT:
    /storage/emulated/0/Pictures/Wallpaper/Galaxy-S7-edge-5~2.png

    Error:
    java.io.FileNotFoundException: /storage/emulated/0/Pictures/Wallpaper/Galaxy-S7-edge-5~2.png (Permission denied)

    Sent from my SM-G935V using Tapatalk
     
  17. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Does AutoTools have file accessing permissions on your device?
     
  18. scotts

    scotts Member

    Joined:
    Jun 19, 2015
    Messages:
    140
    Likes Received:
    1
    Just checked. Somehow, permission had been changed. Working now. Thank you.

    Sent from my SM-G935V using Tapatalk
     
  19. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Awesome :)
     
  20. Bino Mathew

    Bino Mathew New Member

    Joined:
    Oct 25, 2017
    Messages:
    1
    Likes Received:
    0
    I am able to set the homescreen wallpapers but not lockscreen with local file in /storage/emulated/0/Download directory (no errror is getting reported for the task execution)- Any pointers on where to look for debugging?
     

Share This Page