[android-developers] Re: Is anyone able to play HLS on Vizio Tablet running 2.3.2

2011-10-03 Thread Mrid
can anyone help me with this issue?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Is anyone able to play HLS on Vizio Tablet running 2.3.2

2011-09-30 Thread Mrid
Hello All, 

I am trying to run HLS on Vizio Tablet running android 2.3.2 but not finding 
luck. 

In media player class, prepare method is failing  giving out 
java.io.IOException 

here is the complete error log 

09-30 11:11:22.610: ERROR/MediaPlayer(2280): error (1, -2147483648)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): error: Prepare failed.: 
status=0x1
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): java.io.IOException: 
Prepare failed.: status=0x1
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.media.MediaPlayer.prepare(Native Method)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
com.example.testhls.MediaPlayerDemo_Video.playVideo(MediaPlayerDemo_Video.java:79)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
com.example.testhls.MediaPlayerDemo_Video.surfaceCreated(MediaPlayerDemo_Video.java:133)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.SurfaceView.updateWindow(SurfaceView.java:556)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.SurfaceView.dispatchDraw(SurfaceView.java:351)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.ViewGroup.drawChild(ViewGroup.java:1644)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.ViewGroup.drawChild(ViewGroup.java:1644)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.View.draw(View.java:6883)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.widget.FrameLayout.draw(FrameLayout.java:363)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.ViewGroup.drawChild(ViewGroup.java:1646)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.ViewGroup.drawChild(ViewGroup.java:1644)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.View.draw(View.java:6883)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.widget.FrameLayout.draw(FrameLayout.java:363)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1862)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.ViewRoot.draw(ViewRoot.java:1522)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.ViewRoot.performTraversals(ViewRoot.java:1258)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.os.Handler.dispatchMessage(Handler.java:99)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.os.Looper.loop(Looper.java:123)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
android.app.ActivityThread.main(ActivityThread.java:3647)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
java.lang.reflect.Method.invokeNative(Native Method)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
java.lang.reflect.Method.invoke(Method.java:507)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
09-30 11:11:22.610: ERROR/MediaPlayerDemo(2280): at 
dalvik.system.NativeStart.main(Native Method)


if anyone is having vizio tablet, please try to run a test program from 
apidemos and let me know. FYI, program is running fine on most of the 
devices like HTC phones and Xoom tablet.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Honeycomb Preview SDK: HTTP Live Streaming support validation

2011-05-23 Thread Mrid
Hello, please respond is there anyone facing problem with HTTP Live
Streaming on Android 3.1 ?
It was running properly on 3.0

On May 18, 11:17 am, Mrid mrid@gmail.com wrote:
 is anyone having the same problem ?

 On May 17, 11:51 am, Mrid mrid@gmail.com wrote:







  Hi Mulder, I was able to play above video until I made an Honeycomb
  update. Now I am not able to play this. I can play this video on
  simulator.
  Please let me know if you are having same problem.

  On Apr 13, 9:06 am, Fox Mulder zebeub...@gmail.com wrote:

   Hi
   If you tried your URL from the emulator this is normal, I just have a
   try and got the same result.

   04-13 17:49:58.547: INFO/StagefrightPlayer(33):
   setDataSource('httplive://wealthtv.apple-vod-geo.adaptive.level3.net/
   sample/samsung/sample4/playlist.m3u8')
   04-13 17:49:58.707: INFO/LiveSession(33): onConnect 'http://
   wealthtv.apple-vod-geo.adaptive.level3.net/sample/samsung/sample4/
   playlist.m3u8'
   04-13 17:49:58.707: INFO/NuHTTPDataSource(33): connect to
   wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/sample4/
   playlist.m3u8@0
   04-13 17:49:59.267: INFO/NuHTTPDataSource(33): connect to
   wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/
   sample4/1000/prog_index.m3u8@0
   04-13 17:49:59.688: INFO/NuHTTPDataSource(33): connect to
   wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/
   sample4/1000/fileSequence0.ts @0
   04-13 17:50:06.899: INFO/avc_utils(33): found AVC codec config (848 x
   480, Main-profile level 4.0)
   04-13 17:50:06.928: INFO/NuHTTPDataSource(33): connect to
   wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/
   sample4/1000/fileSequence1.ts @0
   04-13 17:50:06.957: INFO/ESQueue(33): found AAC codec config (48000
   Hz, 2 channels)
   04-13 17:50:07.017: INFO/MPEG2TSExtractor(33): haveAudio=1,
   haveVideo=1
   04-13 17:50:14.522: INFO/NuHTTPDataSource(33): connect to
   wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/
   sample4/1000/fileSequence2.ts @0
   04-13 17:50:19.738: ERROR/MediaPlayer(1293): error (1, -2147483648)
   04-13 17:50:22.848: ERROR/MediaPlayer(1293): Error (1,-2147483648)

   In fact I got same issue for many other URL on emulator that perfectly
   work on a Motorola XOOM.
   I will be able to test your URL on the XOOM on friday.
   Zbb

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Honeycomb Preview SDK: HTTP Live Streaming support validation

2011-05-18 Thread Mrid
is anyone having the same problem ?

On May 17, 11:51 am, Mrid mrid@gmail.com wrote:
 Hi Mulder, I was able to play above video until I made an Honeycomb
 update. Now I am not able to play this. I can play this video on
 simulator.
 Please let me know if you are having same problem.

 On Apr 13, 9:06 am, Fox Mulder zebeub...@gmail.com wrote:







  Hi
  If you tried your URL from the emulator this is normal, I just have a
  try and got the same result.

  04-13 17:49:58.547: INFO/StagefrightPlayer(33):
  setDataSource('httplive://wealthtv.apple-vod-geo.adaptive.level3.net/
  sample/samsung/sample4/playlist.m3u8')
  04-13 17:49:58.707: INFO/LiveSession(33): onConnect 'http://
  wealthtv.apple-vod-geo.adaptive.level3.net/sample/samsung/sample4/
  playlist.m3u8'
  04-13 17:49:58.707: INFO/NuHTTPDataSource(33): connect to
  wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/sample4/
  playlist.m3u8@0
  04-13 17:49:59.267: INFO/NuHTTPDataSource(33): connect to
  wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/
  sample4/1000/prog_index.m3u8@0
  04-13 17:49:59.688: INFO/NuHTTPDataSource(33): connect to
  wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/
  sample4/1000/fileSequence0.ts @0
  04-13 17:50:06.899: INFO/avc_utils(33): found AVC codec config (848 x
  480, Main-profile level 4.0)
  04-13 17:50:06.928: INFO/NuHTTPDataSource(33): connect to
  wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/
  sample4/1000/fileSequence1.ts @0
  04-13 17:50:06.957: INFO/ESQueue(33): found AAC codec config (48000
  Hz, 2 channels)
  04-13 17:50:07.017: INFO/MPEG2TSExtractor(33): haveAudio=1,
  haveVideo=1
  04-13 17:50:14.522: INFO/NuHTTPDataSource(33): connect to
  wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/
  sample4/1000/fileSequence2.ts @0
  04-13 17:50:19.738: ERROR/MediaPlayer(1293): error (1, -2147483648)
  04-13 17:50:22.848: ERROR/MediaPlayer(1293): Error (1,-2147483648)

  In fact I got same issue for many other URL on emulator that perfectly
  work on a Motorola XOOM.
  I will be able to test your URL on the XOOM on friday.
  Zbb

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Honeycomb Preview SDK: HTTP Live Streaming support validation

2011-05-17 Thread Mrid
Hi Mulder, I was able to play above video until I made an Honeycomb
update. Now I am not able to play this. I can play this video on
simulator.
Please let me know if you are having same problem.


On Apr 13, 9:06 am, Fox Mulder zebeub...@gmail.com wrote:
 Hi
 If you tried your URL from the emulator this is normal, I just have a
 try and got the same result.

 04-13 17:49:58.547: INFO/StagefrightPlayer(33):
 setDataSource('httplive://wealthtv.apple-vod-geo.adaptive.level3.net/
 sample/samsung/sample4/playlist.m3u8')
 04-13 17:49:58.707: INFO/LiveSession(33): onConnect 'http://
 wealthtv.apple-vod-geo.adaptive.level3.net/sample/samsung/sample4/
 playlist.m3u8'
 04-13 17:49:58.707: INFO/NuHTTPDataSource(33): connect to
 wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/sample4/
 playlist.m3u8@0
 04-13 17:49:59.267: INFO/NuHTTPDataSource(33): connect to
 wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/
 sample4/1000/prog_index.m3u8@0
 04-13 17:49:59.688: INFO/NuHTTPDataSource(33): connect to
 wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/
 sample4/1000/fileSequence0.ts @0
 04-13 17:50:06.899: INFO/avc_utils(33): found AVC codec config (848 x
 480, Main-profile level 4.0)
 04-13 17:50:06.928: INFO/NuHTTPDataSource(33): connect to
 wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/
 sample4/1000/fileSequence1.ts @0
 04-13 17:50:06.957: INFO/ESQueue(33): found AAC codec config (48000
 Hz, 2 channels)
 04-13 17:50:07.017: INFO/MPEG2TSExtractor(33): haveAudio=1,
 haveVideo=1
 04-13 17:50:14.522: INFO/NuHTTPDataSource(33): connect to
 wealthtv.apple-vod-geo.adaptive.level3.net:80/sample/samsung/
 sample4/1000/fileSequence2.ts @0
 04-13 17:50:19.738: ERROR/MediaPlayer(1293): error (1, -2147483648)
 04-13 17:50:22.848: ERROR/MediaPlayer(1293): Error (1,-2147483648)

 In fact I got same issue for many other URL on emulator that perfectly
 work on a Motorola XOOM.
 I will be able to test your URL on the XOOM on friday.
 Zbb

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Honeycomb Preview SDK: HTTP Live Streaming support validation

2011-04-05 Thread Mrid
referring to the solution in bug report, I tried to play a .m3u8
format file by using httplive:// instead of http:// in the url. I was
able to play the sample video from apple but I am not able to
play .m3u8 files which I have. These are directly from inlet and I am
able to play them on iphones and safari web browser, but not on
android's media player and web browser. Url is in the log

04-05 13:45:11.506: ERROR/PATH(630): Path =
http://wealthtv.apple-vod-geo.adaptive.level3.net/sample/samsung/sample4/playlist.m3u8
04-05 13:45:12.007: INFO/StagefrightPlayer(33): setDataSource('http://
wealthtv.apple-vod-geo.adaptive.level3.net/sample/samsung/sample4/
playlist.m3u8')
04-05 13:45:12.087: INFO/NuHTTPDataSource(33): connect to
http://wealthtv.apple-vod-geo.adaptive.level3.net/sample/samsung/sample4/playlist.m3u8
@0
04-05 13:45:12.377: INFO/NuCachedSource2(33): ERROR_END_OF_STREAM
04-05 13:45:12.387: ERROR/MediaPlayer(630): error (1, -2147483648)
04-05 13:45:12.447: ERROR/StreamingPlayer(630): error: Prepare
failed.: status=0x1
04-05 13:45:12.447: ERROR/StreamingPlayer(630): java.io.IOException:
Prepare failed.: status=0x1






On Feb 24, 9:38 am, Fox Mulder zebeub...@gmail.com wrote:
 @Samuh

 I finaly discovered why we have the same error..
 It is because, the streams we are trying to play are in main-profil
 and SDK3.0 only can play Baseline-profil
 take a look herehttp://developer.android.com/guide/appendix/media-formats.html

 All the stream i tried in baseline-profile were OK
 02-24 16:25:06.901: INFO/avc_utils(33): found AVC codec config (192 x
 144, Baseline-profile level 1.1)
 02-24 16:28:39.220: INFO/avc_utils(33): found AVC codec config (320 x
 240, Baseline-profile level 1.3)
 02-24 16:30:45.821: INFO/avc_utils(33): found AVC codec config (480 x
 360, Baseline-profile level 2.1)
 02-24 16:39:48.302: INFO/avc_utils(33): found AVC codec config (320 x
 240, Baseline-profile level 1.2)
 02-24 16:41:18.690: INFO/avc_utils(33): found AVC codec config (176 x
 144, Baseline-profile level 1.0)

 These one were KO
 02-24 16:45:59.700: INFO/avc_utils(33): found AVC codec config (640 x
 360, Main-profile level 3.0)
 02-24 16:52:53.350: INFO/avc_utils(33): found AVC codec config (320 x
 180, Main-profile level 1.3)

 Zbb

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Honeycomb Preview SDK: HTTP Live Streaming support validation

2011-04-05 Thread Mrid
can anyone tell me what can be the problem?
I am stuck on this !!


On Apr 5, 2:15 pm, Mrid mrid@gmail.com wrote:
 referring to the solution in bug report, I tried to play a .m3u8
 format file by using httplive:// instead of http:// in the url. I was
 able to play the sample video from apple but I am not able to
 play .m3u8 files which I have. These are directly from inlet and I am
 able to play them on iphones and safari web browser, but not on
 android's media player and web browser. Url is in the log

 04-05 13:45:11.506: ERROR/PATH(630): Path 
 =http://wealthtv.apple-vod-geo.adaptive.level3.net/sample/samsung/samp...
 04-05 13:45:12.007: INFO/StagefrightPlayer(33): setDataSource('http://
 wealthtv.apple-vod-geo.adaptive.level3.net/sample/samsung/sample4/
 playlist.m3u8')
 04-05 13:45:12.087: INFO/NuHTTPDataSource(33): connect 
 tohttp://wealthtv.apple-vod-geo.adaptive.level3.net/sample/samsung/samp...
 @0
 04-05 13:45:12.377: INFO/NuCachedSource2(33): ERROR_END_OF_STREAM
 04-05 13:45:12.387: ERROR/MediaPlayer(630): error (1, -2147483648)
 04-05 13:45:12.447: ERROR/StreamingPlayer(630): error: Prepare
 failed.: status=0x1
 04-05 13:45:12.447: ERROR/StreamingPlayer(630): java.io.IOException:
 Prepare failed.: status=0x1

 On Feb 24, 9:38 am, Fox Mulder zebeub...@gmail.com wrote:







  @Samuh

  I finaly discovered why we have the same error..
  It is because, the streams we are trying to play are in main-profil
  and SDK3.0 only can play Baseline-profil
  take a look 
  herehttp://developer.android.com/guide/appendix/media-formats.html

  All the stream i tried in baseline-profile were OK
  02-24 16:25:06.901: INFO/avc_utils(33): found AVC codec config (192 x
  144, Baseline-profile level 1.1)
  02-24 16:28:39.220: INFO/avc_utils(33): found AVC codec config (320 x
  240, Baseline-profile level 1.3)
  02-24 16:30:45.821: INFO/avc_utils(33): found AVC codec config (480 x
  360, Baseline-profile level 2.1)
  02-24 16:39:48.302: INFO/avc_utils(33): found AVC codec config (320 x
  240, Baseline-profile level 1.2)
  02-24 16:41:18.690: INFO/avc_utils(33): found AVC codec config (176 x
  144, Baseline-profile level 1.0)

  These one were KO
  02-24 16:45:59.700: INFO/avc_utils(33): found AVC codec config (640 x
  360, Main-profile level 3.0)
  02-24 16:52:53.350: INFO/avc_utils(33): found AVC codec config (320 x
  180, Main-profile level 1.3)

  Zbb

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] LiveFeed

2010-12-08 Thread Mrid
Hi there,

I have a rtmp url which provides live telecast for a channel.
I am new to this, so I dont know how to proceed on this in order to
start this on my device?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Improper Audio format while using AudioRecord API

2010-10-15 Thread Mrid
I am able to store 16 bit sample in byte Array.. and the file size is
coming out to be what it should be, but raw format which I am getting
is something weired. Output file in BigEndian matches very with the
normal but still not intelligible.

On Oct 12, 8:37 pm, BobG bobgard...@aol.com wrote:
 Cant store a 16 bit sample into a byte array?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Improper Audio format while using AudioRecord API

2010-10-12 Thread Mrid
I am doing recording in following way and storing byte array in a
binary file. But the binary file I am getting is not in any format.
what can be the problem?


int bufferSize = AudioRecord.getMinBufferSize(8000,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT);
byte[] tempBuffer = new byte[bufferSize];
AudioRecord recorder = new
AudioRecord(MediaRecorder.AudioSource.MIC, 8000,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT,bufferSize*4);
recorder.startRecording();
bufferRead = recorder.read(tempBuffer, 0, bufferSize);
FileOutputStream fos = new FileOutputStream(new 
File(sdcard/
output.bi));
OutputStreamWriter osw = new OutputStreamWriter(fos);
for (int idxBuffer = 0; idxBuffer  bufferRead; 
++idxBuffer) {
osw.write(tempBuffer[idxBuffer]);
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: javax.sound alternative

2010-10-08 Thread Mrid
Does Android supports recording in u-law format. I can see PCM-16 and
PCM-8bit raw format.
If not, what can be done like adding header separately?

On Oct 7, 4:37 pm, Mrid mrid@gmail.com wrote:
 Thank you Mark for the reply.
 I am here uptil now.

                         int bufferSize =
 AudioRecord.getMinBufferSize(8000,
 AudioFormat.CHANNEL_CONFIGURATION_MONO,
 AudioFormat.ENCODING_PCM_16BIT);
                         AudioRecord recorder = new
 AudioRecord(MediaRecorder.AudioSource.MIC, 8000,
 AudioFormat.CHANNEL_CONFIGURATION_MONO,
 AudioFormat.ENCODING_PCM_16BIT,bufferSize*4);
                         recorder.startRecording();
                         al.length(4000);

                         byte[] tempBuffer = new byte[bufferSize];
                         bufferRead = recorder.read(tempBuffer, 0, bufferSize);

                         for (int idxBuffer = 0; idxBuffer  bufferRead; 
 ++idxBuffer) {
                                 Log.i(+idxBuffer, +tempBuffer[idxBuffer]);
                         }
                         recorder.stop();
                         return tempBuffer;

 which is uptil step 7 in my above post. I dont know how to proceed
 from here. I tried to pass this byte array on to the server (which
 accepts above format), and the server responded me with incorrect
 format error.
 Do you have any idea how to proceed from here?

 On Oct 7, 2:56 pm, OldSkoolMark m...@sublimeslime.com wrote:



  The current Android audio API's are rather spotty in terms of what
  they provide. You'll have to write your own .wav converter at the very
  least.

  On Oct 7, 2:09 pm, Mrid mrid@gmail.com wrote:

   can anyone please help me on this ?

   On Oct 6, 3:37 pm, Mrid mrid@gmail.com wrote:

Hi All,

wanted to know is there any alternative ofjavax.sound.sampled package
specially AudioSystem and TargetDataLine class. Here is the sample
code in java I am referring to :

                1       AudioFormat af = new
AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 8000.0F, 16, 1, 2,
8000.0F, false);
                2       DataLine.Info info = new
DataLine.Info(TargetDataLine.class, af);
                3       TargetDataLine line = (TargetDataLine) 
AudioSystem.getLine(info);
                4       line.open(af, 800);
                5       SoundRecorder recorder = new 
SoundRecorder(line, this,
seconds);                          //  this class records the sound
and returns recording in byte array
                6       recorder.start();
                7       recorder.join();
                8
                9       // Write with headers
                10      ByteArrayInputStream soundbytes = new
ByteArrayInputStream(recorder.getRecording());
                11      ByteArrayOutputStream byteswithheaders = new
ByteArrayOutputStream();
                12      AudioSystem.write(new 
AudioInputStream(soundbytes, af,
soundbytes.available() / 2), AudioFileFormat.Type.WAVE,
byteswithheaders);
                13      return byteswithheaders.toByteArray();

So far I am able to record the data in format specified in step 1. and
convert it into byte array.
My doubts:
-I recorded sound without using Dataline class, will that make any
difference
-Which class should I use in Android, instead of step 12.
- or some one has any other idea??

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: javax.sound alternative

2010-10-07 Thread Mrid
can anyone please help me on this ?

On Oct 6, 3:37 pm, Mrid mrid@gmail.com wrote:
 Hi All,

 wanted to know is there any alternative ofjavax.sound.sampled package
 specially AudioSystem and TargetDataLine class. Here is the sample
 code in java I am referring to :

                 1       AudioFormat af = new
 AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 8000.0F, 16, 1, 2,
 8000.0F, false);
                 2       DataLine.Info info = new
 DataLine.Info(TargetDataLine.class, af);
                 3       TargetDataLine line = (TargetDataLine) 
 AudioSystem.getLine(info);
                 4       line.open(af, 800);
                 5       SoundRecorder recorder = new SoundRecorder(line, this,
 seconds);                          //  this class records the sound
 and returns recording in byte array
                 6       recorder.start();
                 7       recorder.join();
                 8
                 9       // Write with headers
                 10      ByteArrayInputStream soundbytes = new
 ByteArrayInputStream(recorder.getRecording());
                 11      ByteArrayOutputStream byteswithheaders = new
 ByteArrayOutputStream();
                 12      AudioSystem.write(new AudioInputStream(soundbytes, af,
 soundbytes.available() / 2), AudioFileFormat.Type.WAVE,
 byteswithheaders);
                 13      return byteswithheaders.toByteArray();

 So far I am able to record the data in format specified in step 1. and
 convert it into byte array.
 My doubts:
 -I recorded sound without using Dataline class, will that make any
 difference
 -Which class should I use in Android, instead of step 12.
 - or some one has any other idea??

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: javax.sound alternative

2010-10-07 Thread Mrid
Thank you Mark for the reply.
I am here uptil now.

int bufferSize =
AudioRecord.getMinBufferSize(8000,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT);
AudioRecord recorder = new
AudioRecord(MediaRecorder.AudioSource.MIC, 8000,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT,bufferSize*4);
recorder.startRecording();
al.length(4000);

byte[] tempBuffer = new byte[bufferSize];
bufferRead = recorder.read(tempBuffer, 0, bufferSize);

for (int idxBuffer = 0; idxBuffer  bufferRead; 
++idxBuffer) {
Log.i(+idxBuffer, +tempBuffer[idxBuffer]);
}
recorder.stop();
return tempBuffer;

which is uptil step 7 in my above post. I dont know how to proceed
from here. I tried to pass this byte array on to the server (which
accepts above format), and the server responded me with incorrect
format error.
Do you have any idea how to proceed from here?


On Oct 7, 2:56 pm, OldSkoolMark m...@sublimeslime.com wrote:
 The current Android audio API's are rather spotty in terms of what
 they provide. You'll have to write your own .wav converter at the very
 least.

 On Oct 7, 2:09 pm, Mrid mrid@gmail.com wrote:



  can anyone please help me on this ?

  On Oct 6, 3:37 pm, Mrid mrid@gmail.com wrote:

   Hi All,

   wanted to know is there any alternative ofjavax.sound.sampled package
   specially AudioSystem and TargetDataLine class. Here is the sample
   code in java I am referring to :

                   1       AudioFormat af = new
   AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 8000.0F, 16, 1, 2,
   8000.0F, false);
                   2       DataLine.Info info = new
   DataLine.Info(TargetDataLine.class, af);
                   3       TargetDataLine line = (TargetDataLine) 
   AudioSystem.getLine(info);
                   4       line.open(af, 800);
                   5       SoundRecorder recorder = new SoundRecorder(line, 
   this,
   seconds);                          //  this class records the sound
   and returns recording in byte array
                   6       recorder.start();
                   7       recorder.join();
                   8
                   9       // Write with headers
                   10      ByteArrayInputStream soundbytes = new
   ByteArrayInputStream(recorder.getRecording());
                   11      ByteArrayOutputStream byteswithheaders = new
   ByteArrayOutputStream();
                   12      AudioSystem.write(new 
   AudioInputStream(soundbytes, af,
   soundbytes.available() / 2), AudioFileFormat.Type.WAVE,
   byteswithheaders);
                   13      return byteswithheaders.toByteArray();

   So far I am able to record the data in format specified in step 1. and
   convert it into byte array.
   My doubts:
   -I recorded sound without using Dataline class, will that make any
   difference
   -Which class should I use in Android, instead of step 12.
   - or some one has any other idea??

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: FYI if you are having trouble in using DOM Parser for parsing general response

2010-10-06 Thread Mrid
yes, i myself posted that in this group that i had problems using DOM
and now got solution so thought of posting this so that others dont
waste time like I did.

On Oct 4, 10:53 pm, Kumar Bibek coomar@gmail.com wrote:
 What does this function do anyway. I could figure out looking at it.

 -Kumar Bibekhttp://techdroid.kbeanie.com

 On Oct 5, 5:13 am, DanH danhi...@ieee.org wrote:



  Yeah, agreed, though I've additionally seen questions posted with no
  question, and answers posted with no answer.

  On Oct 4, 7:04 pm, TreKing treking...@gmail.com wrote:

   On Mon, Oct 4, 2010 at 4:22 PM,Mridmrid@gmail.com wrote:
I was having problem in using DOM parser for SDK 1.6

   And just what was this problem you faced?

   There have been many questions posted here with no answers - first time 
   I've
   seen an answer posted with no question ...

   ---
--
   TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
   transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] javax.sound alternative

2010-10-06 Thread Mrid
Hi All,

wanted to know is there any alternative of javax.sound.sampled package
specially AudioSystem and TargetDataLine class. Here is the sample
code in java I am referring to :

1   AudioFormat af = new
AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 8000.0F, 16, 1, 2,
8000.0F, false);
2   DataLine.Info info = new
DataLine.Info(TargetDataLine.class, af);
3   TargetDataLine line = (TargetDataLine) 
AudioSystem.getLine(info);
4   line.open(af, 800);
5   SoundRecorder recorder = new SoundRecorder(line, this,
seconds);  //  this class records the sound
and returns recording in byte array
6   recorder.start();
7   recorder.join();
8
9   // Write with headers
10  ByteArrayInputStream soundbytes = new
ByteArrayInputStream(recorder.getRecording());
11  ByteArrayOutputStream byteswithheaders = new
ByteArrayOutputStream();
12  AudioSystem.write(new AudioInputStream(soundbytes, af,
soundbytes.available() / 2), AudioFileFormat.Type.WAVE,
byteswithheaders);
13  return byteswithheaders.toByteArray();


So far I am able to record the data in format specified in step 1. and
convert it into byte array.
My doubts:
-I recorded sound without using Dataline class, will that make any
difference
-Which class should I use in Android, instead of step 12.
- or some one has any other idea??

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] FYI if you are having trouble in using DOM Parser for parsing general response

2010-10-04 Thread Mrid
Hi, I was having problem in using DOM parser for SDK 1.6 , it was
working properly on SDK 2.2. Now I figured it out. Thought of sharing
it so that others dont have to waste their time. Here is the solution
to make this thing work




private void parseXMLResponse(String xml) throws Exception{
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(new InputSource(new
StringReader(xml)));
doc.getDocumentElement().normalize();
String docType = doc.getDocumentElement().getTagName();
Node node ;
Element ele = doc.getDocumentElement();
Log.i(Node is,   hii  +ele.getChildNodes().getLength());
NodeList nodes = ele.getChildNodes();
responsetype = docType;
for(int i = 0; inodes.getLength(); i++){
node = nodes.item(i);
if (node.getNodeType() == 1){
responsevalues.put(node.getNodeName(),
node.getFirstChild().getNodeValue());
}
}
}


xml : your xml string

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Problem in using Document Builder parser on Device

2010-10-01 Thread Mrid
Can anyone please reply on this ??

On Sep 30, 8:44 pm, Mrid mrid@gmail.com wrote:
 Hello All,

 I am using document builder parser for parsing xml response from the
 server. It works fine on emulator (SDK 1.6 and 2.2 both) but when I
 tried to use that on LG Moment (SDK 2.1), it failed.
 Found out that it is not able to load the xml response as a whole
 document. Also,  XML response is very small, so it cant be a memory
 problem. Can anyone suggest an approach to solve this??

 Thank you

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Problem in using Document Builder parser on Device

2010-09-30 Thread Mrid
Hello All,

I am using document builder parser for parsing xml response from the
server. It works fine on emulator (SDK 1.6 and 2.2 both) but when I
tried to use that on LG Moment (SDK 2.1), it failed.
Found out that it is not able to load the xml response as a whole
document. Also,  XML response is very small, so it cant be a memory
problem. Can anyone suggest an approach to solve this??

Thank you

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Using make file of a cpp project in Android.mk

2010-08-21 Thread Mrid
HI all,
I have a project which I can run on CPP and I used JNI to run it on
Java. To make it run on Android, how should I call its make files in
Android.mk or is there any other way to do that.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en