Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,804,641 Members 43,785 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Random Bitmap display In Widget

Tip us?
 
kevp75
Old
(Last edited by kevp75; 15th May 2014 at 09:29 PM.)
#1  
kevp75's Avatar
Senior Member - OP
Thanks Meter 851
Posts: 1,820
Join Date: Aug 2012

 
DONATE TO ME
Default [Q] Random Bitmap display In Widget

I have a widget with a few items in it. 1 is a bitmap.

What I would like to do is know if I can randomly show a different one, based on a set timeframe (or even time of day)

I have see the following in advanced parameters, however, it does not seem to change the bitmap... so I'm not sure what to do...

Maybe if you can explain some of the params in it, it would help:

Code:
[ b ]/sdcard/walls/$#Dm#>0?(int((random())*10))$.jpg[ /b ]
I get the math part of it... but I guess what I'm wondering is, what is #Dm#, and what is ? mean...

Does it mean, that every 1 minute, the next random .jpg in the series will show?
Rockin' it from my Vision-X N3 US on My Note 3

Check me out online @ http://kevin.pirnie.us
 
kevp75
Old
#2  
kevp75's Avatar
Senior Member - OP
Thanks Meter 851
Posts: 1,820
Join Date: Aug 2012

 
DONATE TO ME
Quote:
Originally Posted by kevp75 View Post
I have a widget with a few items in it. 1 is a bitmap.

What I would like to do is know if I can randomly show a different one, based on a set timeframe (or even time of day)

I have see the following in advanced parameters, however, it does not seem to change the bitmap... so I'm not sure what to do...

Maybe if you can explain some of the params in it, it would help:

Code:
[ b ]/sdcard/walls/$#Dm#>0?(int((random())*10))$.jpg[ /b ]
I get the math part of it... but I guess what I'm wondering is, what is #Dm#, and what is ? mean...

Does it mean, that every 1 minute, the next random .jpg in the series will show?
I have changed the code to be:
Code:
[ b ]/sdcard/walls/$#Dm#%30>0?(int((random())*10))$.jpg[ /b ]
and have verified that there are 1 - 10.jpg's in the location specified, but everytime I unlock the screen the image changes... and a popup happens... stating "No wallpapers added"

I think I can figure out the "No wallpapers" part, but why does the image change on every unlock? I can't sit and watch my screen for an hour to verify that they change every 30 minutes... but I assume that they would...
Rockin' it from my Vision-X N3 US on My Note 3

Check me out online @ http://kevin.pirnie.us
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes