how to send live recording audio
-
hi i have a below code which was supposed to record every 100ms and send the data to pc via bluetooth but every time the loop starts i asks for permission to access mic and also permission to store the recorded data but i need to supress this message is it possible if so please help me this is my code public void recordData() { dips = Display.getDisplay(this); m_CmdStop = new Command("stop", Command.SCREEN, 1); form = new Form("record"); form.addCommand(m_CmdStop); dips.setCurrent(form); try { DataOutputStream dos = m_Con.openDataOutputStream(); Player p = Manager.createPlayer("capture://audio"); p.realize(); p.prefetch(); RecordControl rc = (RecordControl)p.getControl("RecordControl"); p.start(); while(m_EndNow != true) { ByteArrayOutputStream output = new ByteArrayOutputStream(); rc.setRecordStream(output); rc.startRecord(); //p.start(); Thread.sleep(100); rc.commit(); //p.stop(); rc.stopRecord(); dos.writeUTF(output.toString()); } p.stop(); dos.close(); } catch(Exception e) { Log.log(e.getMessage()); } }