PocketMode

Version 1.2 on CydiaStore for $1.99.

Update: iOS 5.0.1 Untethered jailbreak is now out and a lot of you are awaiting a PocketMode update. Apple have changed a lot of the private frameworks in iOS 5 and as such I’m having trouble finding a way to get PocketMode working on it. This means there’s no ETA currently but I am working on it. I use this as much as you guys!

About

PocketMode detects when your phone is in your pocket or bag and makes the phone gradually ring louder to alert you to incoming calls and text messages. As soon as you take the phone out or answer the call the ring volume returns to normal. Perfect for those who don’t want a noisy phone all the time but don’t want to miss important calls or texts.

PocketMode works by using the ambient light sensor to detect the darkness of a pocket or bag. Don’t want your phone ringing louder at night? Enable night mode to disable PocketMode at night time.

PocketMode can also override the mute switch temporarily for phone calls when enabled and is fully configurable to customise how you fast you want the volume to increase. Simply set your normal ring volume as usual and PocketMode will increase it from there!

Compatible with all iPhones on iOS4 and later.

Manual

The settings page allows you to enable and disable PocketMode as well as configure how it behaves.

You can set PocketMode to ignore the mute switch when it detects its in a pocket by enabling this first toggle. Doing so means when in a pocket and the ringer switch is set to vibrate the phone will still ring until you remove it from your pocket. This setting overrides the mute switch for calls and texts.

The sensitivity slider lets you set the trigger level for detecting if its dark or not. By default this is set to 5 lux. Sliding to the right will increase it up to 10 which means anything less than 10 lux is considered dark enough to be a pocket or bag. Setting to 0 by sliding to the left will require absolute darkness and isn’t recommended as this is rarely achieved.

Call

The first slider set how long in seconds PocketMode waits before increasing the volume again. This can be any setting from 0 to 30 seconds depending on your preference. Setting it to 0 will make PocketMode increase the volume as fast as possible. By default this is 2 seconds.

The second slider sets how much the volume goes up by each time PocketMode increases the volume. This can be anything from a small fraction of the volume to the whole volume depending on your preference. If you wish for it to gradually increase set this very low.

Text Message

Enable or disable PocketMode for text messages. This lets you set the volume of text message alerts when in a pocket or bag.

Mail

Enable or disable PocketMode for incoming mail. This lets you set the volume of mail notifications when activated by PocketMode.

Night Mode

Night mode allows you to avoid unwanted disturbances at night when the darkness of a room might be falsely interpreted as the interior of a pocket or bag. By enabling night mode and setting the hours you want PocketMode will check this before enabling itself and instead your phone will ring normally or just vibrate depending on your normal settings.

Set the time in hours and minutes you wish night mode to run during using the sliding pickers.

FAQ

Does this drain my battery due to using the ambient light sensor?

No, the ALS is only enabled when an incoming call is received and is disabled again as soon as the call is answered, rejected or blocked or a light event is triggered. The ALS does not run all the time.

Why don’t you use the proximity sensor instead of the ambient light sensor?

Due to the way Apple have implemented the proximity sensor the ALS gives much more fine grained control (one can gather a reading in discrete amounts of lux – the measurement of light) and the proximity sensor can only be ‘triggered’. In other words the proximity sensor can only read when the iPhone is placed near something. This means an iPhone that is static in a pocket or bag won’t trigger the sensor so it’s current state is unknown when a call is detected. Should this change with iOS5 I will endeavour to support the proximity sensor.

Support

E-mail me or use one of the methods listed on the contact page for support and feature requests.

Changelog

Version 1.2

  • Added support for incoming Mail notifications
  • Added SBSettings Toggle to quickly enable disable PocketMode
  • Various bug fixes

Version 1.1.3

  • Volume adjustments are now discrete – they no longer show the heads up display
  • Clarified what the slider in the text message section does
  • Fixed volume resetting to 1 bar when PocketMode initialises from a fresh respring
  • Fixed another bug relating to volume resetting when phone is muted but has mute override disabled

Version 1.1.2

  • Fixed Night Mode for users in timezones other than GMT

Version 1.1.1

  • Fixed Night Mode not working for SMS alerts
  • Added label to clarify what the SMS alert volume slider is in settings

Version 1.1

  • Added SMS functionality
  • Added configurable sensitivity
  • Improved settings handling
  • ALS settings are now restored after call is terminated

Version 1.0

  • Initial release

41 thoughts on “PocketMode”

  1. Hi,
    I just installed pocketmode and love the idea.
    I like to place my phone flat on THE table with my screen down.
    Do you thinking it is possible have THE option to disable it when THE phone is flat (horizontal)?

    Aage

    1. I can look into using the accelerometer to detect when the phone is in that position but it will likely make the tweak a fair bit “heavier” but I’ll see what I can do.

      What device do you have? iPhone 4?

  2. Hi, First, not sure why it is not working when I have it on pocket or a place dark eve though I have set the twek correctly. Second, if I just reject a call with EZDecline the iphone resprings, but if I unable PocketMode, everything works again.

  3. Hi, I really loved the idea but SMS function isn’t working well with bitesms.
    Also when you receive a call when phone is locked and you decline it by pressing power button, springboard crashes. Please fix dude:)

    1. Hi, what’s the issue with BiteSMS? I was unable to replicate the SpringBoard crashing so could you list your OS version, device and what mobile substrate extensions you have installed?

  4. Hi, this tweak is working well for incoming call. But when I receive SMS, the volume won’t back to normal. It stay at the max value.

    1. Hi, so the volume increases for the SMS alert right then doesn’t return to the normal value? It’s set by default to return to the normal volume after 5 seconds. Perhaps you didn’t wait long enough?

      1. Well, I tried to wait for about 10 seconds after that I open it. When I check the volume, it still at the max value.
        Is there any problem with lockinfo and popup blocker? Because I installed both of them on my iPhone4 – 4.3.3

        1. There could be an issue with those. Do you have any other MobileSubstrate extensions installed? Have you tried the latest version of PocketMode too? 1.1.2.

  5. Today I got a couple of calls while I had my iPhone in my pocket and I couldn’t tell who was calling because my screen was so dark. I’m I missing a setting here?

    Thanks

    1. PocketMode doesn’t affect the brightness of the screen so it must be you have the screen brightness turned down too low.

      1. I second Arodweb. It does affect brightness. When in pocket or face down, the screen goes 90% dark and cannot be read

  6. I am having the same issue with the screen going almost completely dark and I am unable to see who’s calling. iPhone 4 Verizon 4.26

    1. Like I said I need to know exactly what causes this in order to replicate it.

      You’re receiving an incoming call while its in your pocket right? Then upon removing it from your pocket the screen dims? Or has it already dimmed. Is the phone locked when receiving the call?

  7. Hi, on my i4 GSM, running 4.1, with LockInfo, PopUp blocker, iAnnounce and EZ Decliner installed, receiving a call while in pocket, on lockscreen, I’m not able to answer: the screen is dark and I can’t see the caller I’D, neither the “reply” or “deny” tabs as usual.
    Any incompatibility with those tweaks?
    Tnx in advance for reply

    1. I have tried to identify this issue but I am unable to replicate. I had the issue once with EZDecline but never again. I am continuing to try and identify the cause though.

    1. Check your settings. The sliders in there set the volume increments either from 0 to 1. Ideally you want about 0.1 or 0.2 if you want it to increase gradually. Also check the time in seconds isn’t too short.

  8. I just installed the latest release and still when I get a call the screen us almost totally dark making it unusable. iPhone 4. 4.3.3

  9. Now, that an untethered JB for iOS 5.0.1 is available, whats about this tweak ?
    Will you continue working on it soon ?
    You already mentioned in Twitter that you will work on it after the JB is available.

    1. I’ve been looking at it over Christmas and Apple have made a lot of changes with what I use in iOS 5. So far I’ve been unable to get the ALS to behave how I want it to so there is a possibility there will be no update. However I use it as much as you guys and will endeavour to get it working. I’m gonna have another crack tomorrow.

      1. No way!! This tweak is the one of the main reasons why I jailbreak. I really hope there’s an update coming. 😐

  10. This hack is one of the reason I jailbroke my iPhone in the first place. I would really really like that you get this hack working again. If you don’t intend to update it, will you release the code so someone else can take a crack at it ?

    1. I am trying but Apple completely changed the IOHID libs in iOS5 and reversing takes time! I am working on it though.

  11. The jailbreak programmer’s community is awesome. I know first hand as my son is one of them. Do not hesitate to let them know you need help. I’m sure they could help you quite a bit in reverse engineering what you’re trying to do.

  12. Dude, are you still alive ? If so, do you intend to support all those who paid for this hack ??? If you don’t intend to support us, please let us know and release your code so someone else can give it a try… I’m sure there are plenty of people in the iOS hack community that could help you… Come on man, let’s get the move on !!! Or at least, be man enough to tell us you’re not going to update this hack…

  13. Would be nice to know, if you’re still planing to release a 5.1.1 compatible version! 🙂 Keep up the good work!

  14. iOS 5.1.1 has come and gone for a while now. Have you started working on an iOS 6 version or you intend to leave of with a piece of unsupported hack ? Have you thought about turning your code over to the jailbreak community so someone else can take over ?

Leave a Reply

Your email address will not be published. Required fields are marked *