-
11-19-2007, 02:29 AM #1
RainbowLight multi-color flashlight updated v2.5
In ModMyI installer is RainbowLight, an iPhone flashlight that does all colors and adjustable brightness.
Left-hand side of screen goes from black (top) to white (bottom).
Rest of screen goes from dim (left) to bright (right) and across all colors (red at top).
So Top LH corner is black, Bottom LH corner is white, Top RH corner is bright red.
Double-tap to exit or press home.
New in version 2.0: Updated to hide status bar. Sets backlight brightness along with color brightness. Restores to default brightness on exit.
New in version 2.5: shake left to right to start blinking. Shake again to turn off blinking.Last edited by NetMage; 11-29-2007 at 04:23 PM. Reason: Updated version 2.5
-
The Following User Says Thank You to NetMage For This Useful Post:
tonydeli7 (11-19-2007)
-
11-21-2007, 01:56 AM #2
New version 2.0 updated in Downloads.
Now hides status bar.
Adjusts backlight brightness with flashlight brightness. Restores brightness to Settings Brightness on exit (not adjusted for ambient light).
-
11-21-2007, 12:45 PM #3
I installed this little app through installer and of course it works fine. However, when I remove it, the icon still appear and work on screen, eventhough I've already reboot iphone.
-
11-21-2007, 01:21 PM #4Owner / Founder - ModMyi
aka poetic_folly
- Join Date
- May 2007
- Location
- Tampa, Florida, United States
- Posts
- 8,207
- Thanks
- 508
- Thanked 4,484 Times in 1,114 Posts
Whoops that should be fixed now, please refresh your source. Missed an "n" in the RemovePath.
Oh, and NetMage, I guess you can also see that this is in our Installer repo now.
-
11-21-2007, 01:34 PM #5
Yes, thanks very much!
Any idea why it doesn't show up in the Recent list?
-
11-21-2007, 01:44 PM #6Owner / Founder - ModMyi
aka poetic_folly
- Join Date
- May 2007
- Location
- Tampa, Florida, United States
- Posts
- 8,207
- Thanks
- 508
- Thanked 4,484 Times in 1,114 Posts
That should be fixed now.
-
11-24-2007, 09:45 AM #7
Hello, I have a problem with the app.
When I install it I get and "main script execution failed!" error. But even though it installs the program. The problem is that I can't remoce it, as it wont show up as an installed app. I reboted but nothing.
Do you have a solution?
Thanks
-
11-24-2007, 10:45 AM #8
You need the BSD Subsystem installed for the MMI install to work.
-
11-24-2007, 02:57 PM #9
Strange bug:
If you tap the screen 3 or 4 times, it exits the light.
-
11-24-2007, 07:10 PM #10
Sorry, a double tap in the same location closes the program.
I needed an additional exit method when I am debugging the program launched from a terminal session, which ignores the home button.
-
The Following User Says Thank You to NetMage For This Useful Post:
bdj21ya (11-24-2007)
-
11-24-2007, 07:28 PM #11
Great app, I love it. I'd love to see the source to get an idea of how you interfaced with the brightness settings. Or if you could just explain that part, it'd be awesome.
For debugging through terminal, why not just use ctrl-c to kill the process? (Unless you need to see output for when the app terminates normally of course).
-
11-24-2007, 09:55 PM #12
-
11-26-2007, 10:02 PM #13
Yeah, I was needing to make sure I restored the brightness on normal exit.
I'll try to put something up on my web site, but meanwhile:
1. I added the following to GraphicsServices.h (maybe not the best idea with toolchain updates, but...)
void GSEventSetBacklightFactor(int newFactor);
void GSEventSetBacklightLevel(float newLevel);
2. I used the following to read the user set brightness preference (close as I could get to the original brightness information):
NSNumber* bl = (NSNumber*) CFPreferencesCopyAppValue(CFSTR("SBBacklightLevel" ), CFSTR("com.apple.springboard"));
prevBacklightLevel = [bl floatValue];
NOTE: It's possible I could send the preferences change message to get SpringBoard to re-sample the ALS, I haven't tested that.
3. I set the new brightness as follows:
GSEventSetBacklightLevel(bright);
where bright is from 0.0 (off) to 1.0 (max).
4. I make sure to restore the brightness (as best I can):
- (void)applicationWillTerminate
{
GSEventSetBacklightLevel(prevBacklightLevel);
}
I did some tests and apparently the ALS value is handled at a lower level, so restoring the brightness this way does restore to what it would have been before running the program.
However, this also means that maximum brightness does not (necessarily) set the backlight to maximum, it is somehow adjusted by the ALS value as well.Last edited by NetMage; 11-26-2007 at 10:02 PM. Reason: Automerged Doublepost
-
The Following User Says Thank You to NetMage For This Useful Post:
bdj21ya (11-28-2007)
-
11-28-2007, 12:17 AM #14
Ok, so now I'm really amazed. How did you ever discover what method sigs you could add to GraphicsServices.h and just have them magically do exactly what you wanted?
You must have so decompiling tools (or incredibly good luck).
So I played around with what you said. I can get it to set the backlight to full brightness with
GSEventSetBacklightLevel(0.01f);
or to all the way dim with
GSEventSetBacklightLevel(1.0f); (or really anything like .4)
but I can't get it to do anything in between, and of course some settings crash the phone altogether.
I'm thinking you must be doing something with
void GSEventSetBacklightFactor(int newFactor);
in order to get it to work with the min and max values you said. Is there something I'm missing?
P.S. I'm on 1.1.1 firmware.Last edited by bdj21ya; 11-28-2007 at 12:17 AM. Reason: Automerged Doublepost
-
11-28-2007, 10:10 PM #15
I used otool to disassemble GraphicServices, SummerBoard and Preferences.app

I created a sample program to show using the Backlight call.
Attached is the source and compiled, installable .app directory. Just set the executable bits on the TestBacklight file.Last edited by NetMage; 11-28-2007 at 10:53 PM.
-
The Following User Says Thank You to NetMage For This Useful Post:
dartveiga (03-25-2008)
-
11-29-2007, 03:52 PM #16My iPhone is a Part of Me
- Join Date
- Jul 2007
- Location
- Orlando FL
- Posts
- 767
- Thanks
- 17
- Thanked 23 Times in 22 Posts
What's in the new update other than a loading screen
-
11-29-2007, 04:21 PM #17
Sorry - didn't realize poetic_folly had a chance to put this up.
The main difference is that you can shake the iPhone to start the light blinking. Shake from side to side fairly quickly. Shake again to stop blinking.
-
11-29-2007, 05:19 PM #18Owner / Founder - ModMyi
aka poetic_folly
- Join Date
- May 2007
- Location
- Tampa, Florida, United States
- Posts
- 8,207
- Thanks
- 508
- Thanked 4,484 Times in 1,114 Posts
Yah, sorry, meant to pm yah. 2.5 is up.
-
11-29-2007, 10:07 PM #19
NP - appreciate the work!
-
11-29-2007, 11:15 PM #20
I never understood the need for this type of app . BUt good work non the less
Robert C ( aka ) Newb with a Iphone



LinkBack URL
About LinkBacks
Reply With Quote


