Wallpaper changer

Post your questions and help other users.

Moderator: Martin

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

Wallpaper changer

Post by Ankit » 26 Mar 2015 13:30

Hi
I recently downloaded the wallpaper changer from catalogue..

I have 200 wallpaper on my folder.
I want that if a wallpaper is set then it should not repeat until each and every wallpaper is set.

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

Re: Wallpaper changer

Post by Martin » 26 Mar 2015 19:57

Hi,

You could store the file list in a global variable once, pick a random element from the global list to show the wallpaper and remove this element from the global list.
The list will get shorter every time you display a new image. You could initialize the global list again when the global list becomes empty.

Regards,
Martin

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

Re: Wallpaper changer

Post by Ankit » 27 Mar 2015 03:34

Hi,

But how would global variable determine if we have added new file or deleted a file....

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Wallpaper changer

Post by MURTUMA » 27 Mar 2015 11:37

It should throw an error when file does not exist. You can handle this by exeption connection, which you should loop back so the flow repeats the wallpaper picking process until it finds a file that exists.

Another way would be by a second flow, which observes the relevant folder and after changes either adds or removes new/deleted files to the list.

The first option can't handle added files and removed files gets deleted, when you next time init the file list. That's why I would recommend the second option.

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

Re: Wallpaper changer

Post by Ankit » 29 Mar 2015 14:34

Hi
I tried to make the flow but I was not successful..

It add the whole list again and again whenever I change the wallpaper...

http://automagic4android.com/flow.php?i ... 9684d1a5a5


Please help !!

Post Reply