Page 1 of 2 12 LastLast
Results 1 to 20 of 32

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: RainbowLight multi-color flashlight

  1. #1
    Default 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; 2007-11-30 at 12:23 AM. Reason: Updated version 2.5

  2. The Following User Says Thank You to NetMage For This Useful Post:

    tonydeli7 (2007-11-19)

  3. #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).

  4. #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.

  5. #4
    Former Owner / Founder of ModMyi Kyle Matthews's Avatar
    Join Date
    May 2007
    Location
    Tampa, Florida, United States
    Posts
    8,516
    Thanks
    577
    Thanked 4,905 Times in 1,247 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.
    .


    ↑ ↑ ↓ ↓ ← → ← → B A [select] [start] Kyle Matthews

  6. #5
    Yes, thanks very much!

    Any idea why it doesn't show up in the Recent list?

  7. #6
    Former Owner / Founder of ModMyi Kyle Matthews's Avatar
    Join Date
    May 2007
    Location
    Tampa, Florida, United States
    Posts
    8,516
    Thanks
    577
    Thanked 4,905 Times in 1,247 Posts

    That should be fixed now.
    .


    ↑ ↑ ↓ ↓ ← → ← → B A [select] [start] Kyle Matthews

  8. #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

  9. #8
    You need the BSD Subsystem installed for the MMI install to work.

  10. #9
    Strange bug:

    If you tap the screen 3 or 4 times, it exits the light.

  11. #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.

  12. The Following User Says Thank You to NetMage For This Useful Post:

    bdj21ya (2007-11-25)

  13. #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).

  14. #12
    Quote Originally Posted by NetMage View Post
    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.
    Well that helps me with that issue, thanks!

  15. #13
    Quote Originally Posted by bdj21ya View Post
    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).
    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; 2007-11-27 at 06:02 AM. Reason: Automerged Doublepost

  16. The Following User Says Thank You to NetMage For This Useful Post:

    bdj21ya (2007-11-28)

  17. #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; 2007-11-28 at 08:17 AM. Reason: Automerged Doublepost

  18. #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.
    Attached Files Attached Files
    Last edited by NetMage; 2007-11-29 at 06:53 AM.

  19. The Following User Says Thank You to NetMage For This Useful Post:

    dartveiga (2008-03-25)

  20. #16
    My 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

  21. #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.

  22. #18
    Former Owner / Founder of ModMyi Kyle Matthews's Avatar
    Join Date
    May 2007
    Location
    Tampa, Florida, United States
    Posts
    8,516
    Thanks
    577
    Thanked 4,905 Times in 1,247 Posts

    Yah, sorry, meant to pm yah. 2.5 is up.
    .


    ↑ ↑ ↓ ↓ ← → ← → B A [select] [start] Kyle Matthews

  23. #19
    NP - appreciate the work!

  24. #20
    I never understood the need for this type of app . BUt good work non the less
    Robert C ( aka ) Newb with a Iphone

Page 1 of 2 12 LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •