On the API reference site, we can see the description 
of android.media.projection says like this: 
A token granting applications the ability to capture screen contents and/or 
*record 
system audio*. 
(
http://developer.android.com/reference/android/media/projection/MediaProjection.html
)

But most screen record apps can not record audio in system when recording 
screen.(For android 5.0 at least without root)
The usual way to record audio is to record by mic, which means the audio is 
played out and the recorded sound will be of poor quality.


If we read the code of MediaProjection.java, there is a 'return null' in 
'public AudioRecord createAudioRecord' function.
(
https://android.googlesource.com/platform/frameworks/base/+/master/media/java/android/media/projection/MediaProjection.java#142
)
public AudioRecord createAudioRecord(
            int sampleRateInHz, int channelConfig,
            int audioFormat, int bufferSizeInBytes) {
        return null;
    }

So whether or nor can  the android.media.projection API record audio in 
system?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/6c22380a-2363-4311-8f43-54739e762994%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to