Wallpaper

Post your questions and help other users.

Moderator: Martin

Ankit
Posts: 143
Joined: 11 Nov 2013 17:27

Wallpaper

Post by Ankit » 13 Jun 2015 12:10

Hi
I have made a flow to change wallpaper randomly and also the wallpaper should not repeat until all are set once. I have achieved it by storing them in global variable.

But my problem is that it add all the name again in global variable list when phone is restarted.
I don't want this to happen..

http://automagic4android.com/flow.php?i ... 85007de4e8


Please help.......

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Wallpaper

Post by Martin » 15 Jun 2015 18:45

Hi,

The action New wallpaper finder will list all files in the specified directory since it's executed the first time after the device and Automagic were restarted. I would probably just remove the trigger Automagic Startup which means that new images would be found the next time all wallpapers have been shown again.
If you don't want to wait that long for new images to show up, you could use a second global list to remember all available images (global_all_images). On startup list all files again (variable images_now) and use script function removeAllElementValues to remove global_all_images from images_now to get the list of images that have been added while Automagic was not running.

Regards,
Martin

Ankit
Posts: 143
Joined: 11 Nov 2013 17:27

Re: Wallpaper

Post by Ankit » 16 Jun 2015 02:13

Hi Martin
If I remove the trigger Automagic Startup, then it shows a specific wallpaper every time the phone is restarted in the widget....
So how to solve this problem??

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Wallpaper

Post by Martin » 16 Jun 2015 18:30

Hi Ankit

Are you using the latest version of Automagic available from Google Play. There was an issue in 1.27 where widgets have not been always saved but this should have been fixed.

Regards,
Martin

Ankit
Posts: 143
Joined: 11 Nov 2013 17:27

Re: Wallpaper

Post by Ankit » 17 Jun 2015 01:32

Hi Martin
My this problem is solved.
Thanks for reply.

Ankit
Posts: 143
Joined: 11 Nov 2013 17:27

Re: Wallpaper

Post by Ankit » 18 Jun 2015 12:56

Hi Martin
One more problem!!
When the flow is triggered after restarting of phone, either by clicking widget or by trigger I.e. time, it add all the value again in global variable list ........
Please help.......

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Wallpaper

Post by Martin » 19 Jun 2015 06:48

Could you share your current version of the flow so I can take a look?


User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Wallpaper

Post by Martin » 22 Jun 2015 19:04

I tried to create a version that only that only adds new images unknown images when the flow is run:
http://automagic4android.com/flow.php?i ... 28f2d472ed

I tried to make as few modifications to the flow as possible:
The script on the left now creates a second list called global_all_wallpapers that contains all images known when the flow is run initially.
The script on the left now checks if the wallpaper was not known when the flow was run initially (global_all_wallpapers does not contain the file). The file is then added to both lists so that a newly discovered file is shown as a wallpaper and that this same file will not be processed again except when all wallpapers have been shown (when global_wallpaper becomes empty).
I hope I didn't miss anything.

The flow could be simplified since the actions to list the files are the same now. The condition Expression that checks if the list is empty could also be integrated to the script that processes the images.

Regards,
Martin

Ankit
Posts: 143
Joined: 11 Nov 2013 17:27

Re: Wallpaper

Post by Ankit » 23 Jun 2015 13:56

Thanks Martin
U solved my problem...
Now its working perfectly...

Post Reply