Android m platform requires permissions when writing app tests using Mediarecoder to record calls up and down through Audiosource.voice_call
<android:name= "Android.permission.CAPTURE_AUDIO_OUTPUT"/> <android:name= "Android.permission.RECORD_AUDIO"/>< android:name = "Android.permission.WRITE_EXTERNAL_STORAGE"/>
But in requesting permission
<android:name= "Android.permission.CAPTURE_AUDIO_OUTPUT"/>
, the app will crash out
The reason is that this privilege is not open to third-party apps, and the app should be signed with the System app signature.
Solution:
Add in ①androidmanifest.xml
<xmlns:android= "http://schemas.android.com/apk/res/android" Android:shareduserid= "Android.uid.system" Package= " Com.thundersoft.tsrecoder ">
Pass
Android:shareduserid= "Android.uid.system"
Let the app have system permissions
② in the android.mk.
Local_certificate: = Platform
Sign the app with a system signature
Android app uses system signature