Welcome, Guest. Please login or register.

Login with username, password and session length
September 07, 2010, 04:21:58 AM
Pages: [1]
  Print  
Topic: how to record from a mobile and send the recorded data to pc via bluetooth  (Read 1023 times)
« on: September 18, 2008, 03:16:22 AM »
manju23reddy
Newbie

View Profile
*
Karma: +0/-0
Posts: 3



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());
        }
    }
Logged
 
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC