Android Question i make a audio libary now ,how get mic permition in JAVA libary.

hears

Active Member
Licensed User
Longtime User
my libary alway get this erro :
java.lang.IllegalStateException: startRecording() called on an uninitialized AudioRecord.


i have try put the under code to mainfest,but the libary cannot access MIC.
<action android:name="android.permission.RECORD_AUDIO"/>
I have searched this code for get permition,how to translate to ba.activity ?

1:
 private static final int GET_RECODE_AUDIO = 1;
    private static String[] PERMISSION_AUDIO = {
            Manifest.permission.RECORD_AUDIO
    };
 
Last edited:

hears

Active Member
Licensed User
Longtime User
thank you ,after change my sdk version, it si work now . just put to "mainfest"
 
Upvote 0
Top