×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    64

    how to encode the capturing signal from audio recoding in j2me

    Hello,

    I am working in j2me application.And i developed one recorder application , Using this application what ever i capture the signal from mic input , That one i want to upload to server.And also i did the Httpconnection for post the data.Here i don't know which variable i call in php ...Please help me regarding this..

    Thanks in advance,
    murugan

  2. #2
    Regular Contributor
    Join Date
    Jul 2010
    Location
    Hyderabad
    Posts
    63

    Re: how to encode the capturing signal from audio recoding in j2me

    What is your problem exactly , on J2me client or PHP server side ??
    Have you done with the http post module on client side?
    please elaborate, definitely it will help you to get solution.
    - Mekal

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    64

    Re: how to encode the capturing signal from audio recoding in j2me

    Hi,
    My httpconnection is write or wrong pleas tell me ..Am attach my code below check it... And server side am using php...

    HTML Code:
    else if (comm == upload) {
    
    			HttpConnection httpcon = null;
    
    			InputStream in = null;
    			OutputStream out = null;
    //"Here recordedSoundArray is ByteArrayOutputStream this one i want to convert to string and send to the database,
     // Here my  conversion is write or wrong and while posting the data ,in php which name i want give..it means "S_POST[string]"
    
    			String string = new String(recordedSoundArray);  
    			System.out.println(string); 
    
    			try {
    				
    				httpcon = (HttpConnection) Connector
    						.open(url);
    				httpcon.setRequestMethod(HttpConnection.POST);
    				httpcon.setRequestProperty("User-Agent",
    						"Profile/MIDP-1.0 Configuration/CLDC-1.0");
    				httpcon.setRequestProperty("Content-Type",
    						"application/x-www-form-urlencoded"); // MUST Put
    				httpcon.setRequestProperty("Content-Length", Integer
    						.toString(string.length()));
    
    				out = httpcon.openDataOutputStream();
    
    				out.write(string.getBytes());
    
    				out.flush();
    				out.close();
    				in = httpcon.openInputStream();
    				messageItem.setText("successfully uploadeded");
    
    			} catch (Exception e) {
    				messageItem.setText("Error in network connection");
    				// TODO: handle exception
    				e.printStackTrace();
    			} finally {
    				try {
    					if (out != null)
    						out.close();
    					if (in != null)
    						in.close();
    					if (httpcon != null)
    						httpcon.close();
    				} catch (IOException ioe) {
    				}
    Thanks in advance,
    murugan
    Last edited by murugacse4; 2011-04-18 at 13:44.

  4. #4
    Regular Contributor
    Join Date
    Jul 2010
    Location
    Hyderabad
    Posts
    63

    Re: how to encode the capturing signal from audio recoding in j2me

    You need to define and set boundry before starting the upload data, also the content type should not be application, you can write audio as a content type.
    You can get a good example code in below link, also you can use protocol analyser likd "wireshark" to inspect you post and response packets.

    http://wiki.forum.nokia.com/index.ph...oad_in_Java_ME
    - Mekal

Similar Threads

  1. How to remove security prompt while recoding audio?
    By onetouch_satish in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2012-03-28, 18:27
  2. How to encode/decode ECC keys in BouncyCastle j2me to/from byte array
    By NotSoNovice in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2011-11-09, 05:37
  3. Capturing a greyscale Image / Recoding a JPEG
    By -chris- in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2008-07-23, 20:26
  4. how to encode in the commuication?
    By lamalado in forum Symbian
    Replies: 1
    Last Post: 2007-05-11, 11:24
  5. how to run the recoding example in the emulator
    By ganngadhar in forum Symbian
    Replies: 3
    Last Post: 2007-01-05, 12:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×