Random wallpaper changer

Share and discuss your flows and ideas with other users.

Moderator: Martin

Mices7
Posts: 8
Joined: 09 Oct 2018 22:41

Random wallpaper changer

Post by Mices7 » 15 Oct 2018 14:07

Hi there,
I've realised a very simple flow which changes the wallpaper every 4 hours.
It works fine but, even though I've selected "Home screen" as Type, also the lock screen image is changes at the same time.
I've then tried to modify the Type in "Lock screen" and effectively only the image of the lock screen changes.

Where am I doing wrong?


Thanks
Attachments
wallpaper.png
wallpaper.png (52.66 KiB) Viewed 26722 times

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Random wallpaper changer

Post by Desmanto » 16 Oct 2018 10:33

From my test, changing home screen wallpaper also change the lockscreen. So in order to change only the home screen wallpaper, you have to use it twice; once to change home screen (and lockscreen) and another to change back the lockscreen to the original one.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Mices7
Posts: 8
Joined: 09 Oct 2018 22:41

Re: Random wallpaper changer

Post by Mices7 » 16 Oct 2018 14:29

Thanks Desmanto you confirmed my doubt.
The trick that you suggested is the one that effectively I adopted.
However, I've tried with another app and it is possible to change the two wallpapers independently.
I assume that we can consider it as a sort of bug, anyway.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Random wallpaper changer

Post by Desmanto » 16 Oct 2018 15:38

What is the another app? Tasker?

AFAIK, the action has been like this since Nougat 7.0+. I wonder if there are nougat 7.0+ user who can change (using automagic Set wallpaper action) only the home screen without changing the lockscreen at the same time.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Mices7
Posts: 8
Joined: 09 Oct 2018 22:41

Re: Random wallpaper changer

Post by Mices7 » 16 Oct 2018 20:11

No, it is not Tasker, I've tried with Automate.
Hence, since with that app it is possible, I thought that there is something wrong with Automagic.

User avatar
digitalstone
Posts: 342
Joined: 21 Oct 2017 12:36
Location: The Netherlands

Re: Random wallpaper changer

Post by digitalstone » 16 Oct 2018 21:10

Desmanto wrote:I wonder if there are nougat 7.0+ user who can change (using automagic Set wallpaper action) only the home screen without changing the lockscreen at the same time.
Android 7.1 here.
I can confirm home-screen and lock-screen are both individually changeable through the automagic "Set wallpaper action".
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Random wallpaper changer

Post by Desmanto » 17 Oct 2018 17:42

@Mices7 : Do you try it on the same device? If same device and ROM, it seems to be Automagic's bug.

@digitalstone : Thanks for the confirmation. This immediately ruled out the limitation on Nougat 7.1. I am using RR 6.2.0 Oreo 8.1 and changing home screen will change the lockscreen too.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Random wallpaper changer

Post by anuraag » 18 Oct 2018 01:47

On my G5+ 8.1 stock rom with automagic changeing home screen wallpaper changes lock screen wallpaper too.

But when i tested it using java script it worked

Code: Select all

homewall="/storage/emulated/0/OOE4xAnBhKo_Full.jpg";
lockwall="/storage/emulated/0/Pictures/Mysplash/KOKxOB8550Q.jpg";

WallpaperManager=callJavaStaticMethod("android.app.WallpaperManager", "getInstance(android.content.Context)", getContext());

homewall=callJavaStaticMethod("android.graphics.BitmapFactory", "decodeFile(java.lang.String)", homewall);
lockwall=callJavaStaticMethod("android.graphics.BitmapFactory", "decodeFile(java.lang.String)", lockwall);

//set home screen wall
callJavaMethod(WallpaperManager, "android.app.WallpaperManager", "setBitmap(android.graphics.Bitmap, android.graphics.Rect, boolean, int)", homewall, null, true, getJavaStaticField("android.app.WallpaperManager", "FLAG_SYSTEM"));

//set lock screen wall
callJavaMethod(WallpaperManager, "android.app.WallpaperManager", "setBitmap(android.graphics.Bitmap, android.graphics.Rect, boolean, int)", lockwall, null, true, getJavaStaticField("android.app.WallpaperManager", "FLAG_LOCK"))
@Martin can you tell me how to use combination of both flags?

Mices7
Posts: 8
Joined: 09 Oct 2018 22:41

Re: Random wallpaper changer

Post by Mices7 » 18 Oct 2018 17:47

Desmanto wrote:@Mices7 : Do you try it on the same device? If same device and ROM, it seems to be Automagic's bug.

@digitalstone : Thanks for the confirmation. This immediately ruled out the limitation on Nougat 7.1. I am using RR 6.2.0 Oreo 8.1 and changing home screen will change the lockscreen too.
Hi Desmanto,yes I tried with the same device and ROM.
BTW, I'm using Oreo 8.0.
Thanks

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Random wallpaper changer

Post by anuraag » 19 Oct 2018 03:33

Mices7 wrote:
Desmanto wrote:@Mices7 : Do you try it on the same device? If same device and ROM, it seems to be Automagic's bug.

@digitalstone : Thanks for the confirmation. This immediately ruled out the limitation on Nougat 7.1. I am using RR 6.2.0 Oreo 8.1 and changing home screen will change the lockscreen too.
Hi Desmanto,yes I tried with the same device and ROM.
BTW, I'm using Oreo 8.0.
Thanks
You can try following flow. Just change path where your images are stored.
http://automagic4android.com/flow.php?i ... 215a125bed

Post Reply