Power connected function

Discussion in 'iOS Development' started by Gaming Warrior, Jun 18, 2008.

  1. Gaming Warrior

    Gaming Warrior New Member

    Joined:
    Dec 8, 2007
    Messages:
    159
    Likes Received:
    12
    Is there a function that will return if the ipod/iphone is plugged into power? or even better is connected to an accessory like a alpine car cd player? both will work but second would be best.
  2. optimo

    optimo New Member

    Joined:
    Sep 28, 2007
    Messages:
    535
    Likes Received:
    17
    There probably is, but I don't know it and it's undocumented
    there are a lot of low-level c-functions that could be exploited
  3. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    Gamng Warrior, get onto the developer's irc channel and look for tman. He has it in his HWInfo app.

    My first guess would be to go take a look at developer.apple.com and search for how to do that on a Mac. The method should be the same on the iPhone. Possibly IOKit?
  4. Gaming Warrior

    Gaming Warrior New Member

    Joined:
    Dec 8, 2007
    Messages:
    159
    Likes Received:
    12
    which irc would this be? url and channel?
  5. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    Start with: irc.osx86.hu #iPhone; #iPhone-Dev; #iTouch.
  6. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    I looked into SpringBoard, and I think I may just have found your answer...

    Register your device to listen for these notifications:
    com.apple.springboard.pluggedin
    com.apple.springboard.fullycharged


    Hope this helped.

    Please Register or Log in to view images

Share This Page