1. skeels's Avatar
    Has anyone seen a 3rd party native app access the top speaker (not the player speaker at the bottom of the phone).

    Better yet - anyone know how to (code wise?).

    THANKS!

    -mc
    Send iPhone System Log: Via any Intelliborn App -> Click Help / FAQs/ Support -> Scroll to bottom and click on red text at bottom.
    MyWi 4.0 - WiFi + USB Tethering on 3.x/4.x/5.x + Simple WiFi Router - Connect Laptops, Touches, + more!
    My3G - Facetime over 3G plus HiDef YouTube and more! Trick your iPhone into thinking it's on WiFi
    IntelliScreenX - iOS 5 Notification Center the way Apple wished it was.
    Tlert - View and Reply to SMS message within any app. Get rid of the ugly default alert messages!
    2008-03-02 11:39 PM
  2. JLA's Avatar
    To get sound out of the receiver, try this:

    Code:
    -(void) switchToReceiver
    {
    NSString* zError;
    AVController* zAVController=[AVController avController];
    
    [zAVController activate: nil];
    [zAVController setAttribute:@"PhoneCall" forKey:@"AVController_AudioCategoryAttribute" error:&zError ];
    }
    2008-03-03 06:05 AM
  3. skeels's Avatar
    JLA - Thanks a ton! Worked great.
    Send iPhone System Log: Via any Intelliborn App -> Click Help / FAQs/ Support -> Scroll to bottom and click on red text at bottom.
    MyWi 4.0 - WiFi + USB Tethering on 3.x/4.x/5.x + Simple WiFi Router - Connect Laptops, Touches, + more!
    My3G - Facetime over 3G plus HiDef YouTube and more! Trick your iPhone into thinking it's on WiFi
    IntelliScreenX - iOS 5 Notification Center the way Apple wished it was.
    Tlert - View and Reply to SMS message within any app. Get rid of the ugly default alert messages!
    2008-03-03 06:03 PM
  4. minhduong1990's Avatar
    i don't get... where did you put the code in?
    2008-03-04 01:01 AM
  5. JLA's Avatar
    Anywhere you want...it can be a class method, so I guess you can change that - to a +.
    Calling it will switch to the audio to the receiver until something switches it back.
    2008-03-04 01:56 AM
  6. jeppesen's Avatar
    When I add the code to my method I get:

    error: 'AVController' undeclared (first use in this function)
    error: 'zAVController' undeclared (first use in this function)


    Do I need an additional framework for this? A have AVFoundation imported and I am successfully playing sounds using AVAudioPlayer. I just want to play the sound through the ear speaker.

    Thanks!
    2009-04-14 07:19 PM
  7. iAppleJuice's Avatar
    To get sound out of the receiver, try this:

    Code:
    -(void) switchToReceiver
    {
    NSString* zError;
    AVController* zAVController=[AVController avController];
    
    [zAVController activate: nil];
    [zAVController setAttribute:@"PhoneCall" forKey:@"AVController_AudioCategoryAttribute" error:&zError ];
    }
    thank you JLA! I'm adding saving this...
    2009-04-15 07:41 AM
  8. vin_schumi's Avatar
    iEarMusik available through the AppStore allows you to do just that - https://itunes.apple.com/us/app/iear...543335277?mt=8
    2013-03-01 02:08 AM
LINK TO POST COPIED TO CLIPBOARD