iOS: access device microphone in background app - ios

Im wondering, is there a way for an app to access the Microphone of an iDevice while running in the background (The device may or may not be locked)?
I need to listen to the audio input and do some sound recognition.
Cheers from Mexico

According to Apple's developer page, you can use the "audio" permission, which gives this access:
The app plays audible content to the user or records audio while in the background. (This content includes streaming audio or video content using AirPlay.)

I do not think this is possible.

Related

iOS screen recording - enable Safari audio?

I'm making screen recordings of an in-house web app, using iOS Safari and the built-in iOS screen recorder. No audio is recorded. If I enable microphone recording, the audio is recorded but poorly and mixed with room sound (likely recording the device's speaker). The same is true of native apps with WKWebViews.
I'm curious what's happening here. Is Safari/Webkit actively blocking audio recording? Is there a Javascript or Webkit instruction to enable audio recording?
Note that I'm not trying to get around any protection from recording commercial videos, just sounds generated from my own site/app, in order to make promotional videos. So changes made within my app or web site are fine.
Disable microphone audio and connect the device to an external audio source (e.g. headphones).

Intercept/modify audio stream on iOS

I am looking at the feasibility of getting the current raw audio stream playing and do stuff with it such as stream it over Bluetooth or equalize it, etc. Is there any way to do this in iOS 8?
For example: apps such as Pandora/Spotify are playing music and I want to access the audio they are playing.
To process audio from another app, that app needs to participate in Inter-App Audio.
I don't know if your example apps do that.

Can I use AVAudioRecorder with an external mic?

Sorry if this question is obvious or duplicated. My 30 minutes of research led me nowhere.
We have an iPhone app that live streams video from the device to our remote Wowza servers.
We're looking to integrate the Swivl (motion tracking tripod) into our product, and it uses a wireless microphone that feeds into the 30-pin port of our iPhone. Swivl's SDK doesn't include anything about capturing audio from their hardware so I assume that it would be handled by the iPhone itself.
If I use the AVAudioRecorer, will it automatically route the audio input from the 30-pin port instead of the default microphone, or do I have to explicitly define the audio source?
Any clues help.
After a few tests, it seems that iOS automatically routes incoming audio signals.
There is no need to explicitly specify the source of the audio.
Straight from AVAudioRecorder documentation:
In iOS, the audio being recorded comes from the device connected by the user—built-in microphone or headset microphone, for example. In OS X, the audio comes from the system’s default audio input device as set by a user in System Preferences.

How to switch off audio output ios?

Is it possible to switch off audio output on device?
I need route the sound to phone's speaker when headphones are connected.
I need to connect some device via audio output(like connect headphones) but if i connected it the voice on ios device is blocked. I want turn off audio output and turn on when i need use this device.
This goes against Apple's Human Interface Guidelines. If you read the section on Technology usage you find a section labelled Sound. It describes the expected behaviour when using headphones:
http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/TechnologyUsage/TechnologyUsage.html#//apple_ref/doc/uid/TP40006556-CH18-SW3
I don't think so you can do this. Because apple is very strict and stick with their functionality.

How to mute mic while Recording using UIImagePickerController?

I am using UIImagePickerController for recording video in one of my application. i have successfully Recorded video. But now i want to mute mic (video without audio) while recording video.
i have searched Alot but not a single clue about it.
please help me about this issue.
is it possible or not. if possible than how.
thanks in advance.
If you want your app to be in app store , then there is no apple approved method to actually mute whole iPhone.There are certain libraries but they are not approved.
Apple's documentation on Audio Session
According to the documentation you can only ask the user to have the phone silenced physically and you can respond to certain audio changes such as other sounds,phone calls, email sounds but you cannot mute programmatically.
Also See this Documentation on Programming in iPhone See the part 3.3 for Audio.(Events that can be accessed and performed in iOS).
You can use AVFoundation framework to record a video without the sound, check at this :
AVFoundation Programming Guide

Resources