Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,740,412 Members 45,155 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 599
Posts: 1,405
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:
Select 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 Smartly GoldenEye 37 NG4 with Black cCc Applied

~ 20GB free cloud https://copy.com?r=vtiraF

Check me out online @ http://kevin.pirnie.us

 
kevp75
Old
#2  
kevp75's Avatar
Senior Member - OP
Thanks Meter 599
Posts: 1,405
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:
Select 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:
Select 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 Smartly GoldenEye 37 NG4 with Black cCc Applied

~ 20GB free cloud https://copy.com?r=vtiraF

Check me out online @ http://kevin.pirnie.us

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes