Results 1 to 5 of 5
Discuss API for Power Management on iOS 4.2 3GS at the iPhone Developer Exchange - Hackint0sh.org; Hey Guys! I was wondering if there is any private API to control the Power ...
  1. #1
    Newbie Array

    Join Date
    Jun 2009
    Posts
    4
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Question API for Power Management on iOS 4.2 3GS

    Hey Guys!
    I was wondering if there is any private API to control the Power of my
    3GS? My girlfriends Sleep Button is broken and I want to code an App
    to control the sleep mode programmatically...
    I already found out that there is a libIOKit.A.dylib but I don't know how
    to implement this into my project.

    Is there also a solution to "Turn Off" the Silent/Ring Button and set the phone
    to silent mode programmatically? She don't want to jailbreak her device so I
    just want to code an App for her.

    Best regards,

    Traxan



  2. #2
    Super Moderator Array Olethros's Avatar

    Join Date
    Sep 2007
    Location
    Norway
    Posts
    8,360
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    439

    Default

    You really are making things way harder than they need to be.

    You are best off getting the hardware button fixed, this is a relatively cheap option at a non official repair place.

    Otherwise, your requirements are met by jailbreak apps and I doubt you will be able to achieve what you want using just the Apple SDK as it often deliberately limits access to system functions like the ones you are asking about.

    Activator can wire the "sleep" function to another trigger - it is extremely flexible tool, one of the most useful jailbreak tweaks released so far in my opinion.

    There are several tweaks related to the silent/mute button, some of the paid-for tweaks offer the ability to trigger the silent mode based on what events are in your calendar. Search for silen on cydia - you will find quite a few options.
    Please read the stickies & search forum before posting!
    How to report an iTunes restore/update fail in a useful manner
    -

    iPad 3G 64GB (4.3.3, Redsn0w) oldest SHSH 3.2.2
    iPhone 4 32GB (4.2.1, Redsn0w JB-monte) oldest SHSH 4.1
    iPhone 3GS 32GB (4.3.3; Pwnagetool) factory unlocked oldest SHSH 3.1
    iPhone 8GB (3.1.3; Pwnagetool) AT&T Locked - Unlocked with bootneuter

    -
    Did we solve your problem? Got a dollar or two spare ? Donate!

  3. #3
    Newbie Array

    Join Date
    Jun 2009
    Posts
    4
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Haha yeah I know all these Tools but she don't want to jailbreak her device... I can understand that somehow...
    I know that there aren't any public API's or funtctions to do what I want to do. But there must be any API to realize that... Or what have all those Tweakdevelopers done to get there Apps running?
    If you know anything about it please let me know!


    greez

  4. #4
    Super Moderator Array Olethros's Avatar

    Join Date
    Sep 2007
    Location
    Norway
    Posts
    8,360
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    439

    Default

    Appstore developers have demonstrated that they can detect and act on button presses (but ONLY while that specific app is running). See for example the various camera apps that allowed you to snap a picture using the remote button on the apple headphones

    Going into sleep mode via an app is probably achievable, but the other item you mentioned, over-riding the behaviour of the ring/silent button... it sounds like you want to do that regardless of which app is active.

    These tweak developers mostly rely on mobilesubstrate to achieve these tweaks. This allows them to patch out default behaviour in the running application only (and not change anything on disk)

    I'm pretty sure that mobilesubstrate requires specific kernel patches to do it's magic. This kind of stuff isn't possible without jailbreak.
    Please read the stickies & search forum before posting!
    How to report an iTunes restore/update fail in a useful manner
    -

    iPad 3G 64GB (4.3.3, Redsn0w) oldest SHSH 3.2.2
    iPhone 4 32GB (4.2.1, Redsn0w JB-monte) oldest SHSH 4.1
    iPhone 3GS 32GB (4.3.3; Pwnagetool) factory unlocked oldest SHSH 3.1
    iPhone 8GB (3.1.3; Pwnagetool) AT&T Locked - Unlocked with bootneuter

    -
    Did we solve your problem? Got a dollar or two spare ? Donate!

  5. #5
    Newbie Array

    Join Date
    Jun 2009
    Posts
    4
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    OK but you mean that it will be possible to lock or sleep the iPhone programmatically?

    Maybe something similar like this:

    #include <CoreFoundation/CoreFoundation.h>
    #include <IOKit/IOKitLib.h>

    int dimDisplayNow(void) {
    io_registry_entry_t r =
    IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/IOResources/
    IODisplayWrangler");
    if(!r) return 1;
    int err = IORegistryEntrySetCFProperty(r, CFSTR("IORequestIdle"),
    kCFBooleanTrue);
    IOObjectRelease(r);
    return err;
    }
    This is like a hack for OSX to force the Display into sleepmode... Like when you put your mouse into the corner and the display turns off.

    Do you know any links or something like that to realize that on the phone? Would be so great...


    greez


 

 

Similar Threads

  1. Power Management doesn´t work!
    By dawitt in forum Kernel / Kext (Driver) Support
    Replies: 0
    Last Post: 10-13-2009, 10:45 PM
  2. [Problem] Power Management
    By ThGraf in forum Hardware
    Replies: 1
    Last Post: 10-12-2009, 03:04 PM
  3. [Problem] Power Management
    By ThGraf in forum Kernel / Kext (Driver) Support
    Replies: 0
    Last Post: 10-10-2009, 01:25 PM
  4. OHR kext for power management?
    By one4house in forum Kernel / Kext (Driver) Support
    Replies: 1
    Last Post: 04-25-2009, 06:12 PM
  5. Replies: 1
    Last Post: 08-02-2008, 08:18 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 05:10 PM.
twitter, follow us!