[android-developers] Re: Require Source code of tools

2008-11-25 Thread Dave Sparks

The source for the entire project is at source.android.com.

On Nov 25, 1:22 am, Amit [EMAIL PROTECTED] wrote:
 Hello friends,

 Can u please tell me where can i get the source code of tools provided
 in sdk. I need source code of DDMS and traceview.

 Any help appreciated.

 Thanks
 Amit
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to obtain meda-data (like bit rate) from audio files ?

2008-11-25 Thread Dave Sparks

The metadata retriever currently doesn't support that level of
detail.

On Nov 24, 12:09 pm, AP08 [EMAIL PROTECTED] wrote:
 I checked android.provider.MediaStore.Audio.Media, but it can provide
 only limited data about audio file. I want to obtain data such as bit-
 rate, how do I get that ?

 thanks,
 AP
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Fw: [android-developers] Re: Android and bluetooth

2008-11-25 Thread Dave Sparks

Bluetooth is a big category. What feature(s) do you need?

On Nov 25, 1:26 am, supernova [EMAIL PROTECTED] wrote:
 Any idea when a version with BT support will be released?
 I need to choose a mobile platform for a project and BT support is
 required.

 On 24 nov, 13:45, Mark Murphy [EMAIL PROTECTED] wrote:

  Android geek wrote:
   That means, I will have to forget BT until the next release of SDK?

  You have two choices:

  1. Work with the core Android team, over onhttp://source.android.com,
  to add greater BT support.

  2. Wait until that work gets done by somebody else.

  In either case, to use it in an SDK-level application (versus in the
  firmware), you will most likely need to wait until the next release of
  the SDK.

  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  _The Busy Coder's Guide to Android Development_ Version 1.4 Published!
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Streaming RTSP directly by suing MediaPlayer

2008-11-25 Thread Dave Sparks

The media framework does support RTSP with RTP payloads. The OpenCore
code includes an RTSP/RTP client built on sockets that will handle
buffering and transport controls.

It does not work in the emulator environment due to some firewall
issues in the emulator network layer.

On Nov 24, 12:30 pm, Jona [EMAIL PROTECTED] wrote:
 Question:
 Does MediaPlayer support the following code.

 mp.setDataSource(rtsp://someRTSPStremingSite.com);

 Does it take the path of the RTSP stream and the Media Player handles
 the connection etc...?
 how would this work?

 Thanks!
 Jona
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Calling youtube from Android

2008-11-25 Thread Dave Sparks

I think you are looking for the following method in
android.content.pm.PackageManager:

public abstract Drawable getActivityIcon(Intent intent)

On Nov 24, 9:03 pm, cse.tlin [EMAIL PROTECTED] wrote:
 Hi davidsparks,
 Can I get the drawable icon ofyoutubeapp from another app?
 I want to offer  youtubeservice when user click this icon.
 Is it possible?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Getting File Descriptor For Pipe

2008-11-26 Thread Dave Sparks

This is unlikely to work because the OpenCore engine isn't setup to
play from a pipe. It plays from a local file, which allows it to seek
within the file, or from an HTTP or RTSP/RTP stream, which requires
content formatted specifically for streaming.

A future version of the SDK will support streamed audio I/O from Java
apps.

On Nov 26, 7:47 am, Kenneth Loafman [EMAIL PROTECTED] wrote:
 I'm relatively new to Java and I need some help, probably in the
 terminology, more than the technology.

 How do you get a file descriptor for a Pipe in Java?  I've looked and I've
 read, but it seems like Java is hiding the underlying filesystem FD and
 file name from the user.

 I need to generate a sound and be able to change it roughly 24 times per
 second.  Threaded MediaPlayer just is not smooth enough to enable it to be
 continuous (clicks and silence), so I was thinking of changing the data
 source to an FD and just feed it a continuous stream, changing as needed.
 I just can't find where Java is hiding the file descriptor.

 Any help will be appreciated.

 ...Thanks,
 ...Ken
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AIDL in same process

2008-11-26 Thread Dave Sparks

IPC binder calls within the same process are treated as local C++
calls, i.e. they occur synchronously on the same thread.

I'm not sure what you are asking in the second part of your question.
Is this a request for dependencies in the Market, e.g. Application A
requires Application B to be installed?

On Nov 26, 4:06 am, Louis [EMAIL PROTECTED] wrote:
 Hi, All

 Our team want build some services which provided to 3rd party, and we
 are trying to design the interfaces which using the AIDL, and also, we
 want to build our own application base on this services also, and run
 in the same process, but is it still need using IPC to transfer the
 data info, that's sounds too heavy for one process, any suggestions
 for it? And also, if we want public to 3rd part, is there anyway to
 install our services and their application together? (Not public our
 codes to them).

 Welcome any help for that.

 Best regards,
 Louis.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: MediaPlayer seek on startup

2008-11-26 Thread Dave Sparks

You must always call prepare() before seekTo(). The player engine
needs to read the first part of the stream to identify the stream type
and required codecs and read the content index (if it exists).

On Nov 26, 2:55 pm, David Given [EMAIL PROTECTED] wrote:
 I'm trying to play streaming music. The user has previously requested
 that the stream start a certain way into the stream. How do I do this?

 What I'm finding is that if I do:

 mediaplayer.setDataSource(...);
 mediaplayer.prepare();
 mediaplayer.seekTo(...);

 ...then the seek happens *after* the initial buffer is read, which of
 course is a waste [*]. But if I do:

 mediaplayer.setDataSource(...);
 mediaplayer.seekTo(...);
 mediaplayer.prepare();

 ...then of course I get an IllegalStateException because the MediaPlayer
 hasn't been prepared yet!

 Has anyone managed to make anything like this work?

 [*] Actually, of course, I'm using prepareAsync(). In fact, what I'm
 observing is that calling seekTo() from the onPrepared() callback tends
 to confuse MediaPlayer and it hands me a -38 error and I have to reset
 and start again. It seems to only want to seek after the playback has
 had a chance to settle for a few moments.

 --
 ┌─── dg@cowlark.com ─http://www.cowlark.com─
 │
 │ ⍎'⎕',∊N⍴⊂S←'←⎕←(3=T)⋎M⋏2=T←⊃+/(V⌽⊂M),(V⊝M),(V,⌽V)⌽(V,V←1⎺1)⊝⊂M)'
 │ --- Conway's Game Of Life, in one line of APL

  signature.asc
  1KViewDownload
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WAV (GSM 6.1) Support?

2008-11-26 Thread Dave Sparks

There is no support for GSM 6.1 and no plans to support it at this
time.

On Nov 26, 9:14 am, Wiggles [EMAIL PROTECTED] wrote:
 Is there anyway to get .wav(GSM 6.1) audio files to play on Android?
 Or is there anyway to get this feature added in later updates?

 I get my voicemails for work emailed to me in this format and cannot
 change the sending format.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Streaming RTSP directly by suing MediaPlayer

2008-11-26 Thread Dave Sparks

I don't expect this issue to be resolved soon.

On Nov 26, 5:36 am, Jérémie Gavard [EMAIL PROTECTED] wrote:
 Thanks for this precision.

 Does this issue on emulator planned to be solved soon?

 I am trying to develop an application around video streaming.

 On Nov 25, 10:58 pm, Dave Sparks [EMAIL PROTECTED] wrote:

  The media framework does support RTSP with RTP payloads. The OpenCore
  code includes an RTSP/RTP client built on sockets that will handle
  buffering and transport controls.

  It does not work in the emulator environment due to some firewall
  issues in the emulator network layer.

  On Nov 24, 12:30 pm, Jona [EMAIL PROTECTED] wrote:

   Question:
   Does MediaPlayer support the following code.

   mp.setDataSource(rtsp://someRTSPStremingSite.com);

   Does it take the path of the RTSP stream and the Media Player handles
   the connection etc...?
   how would this work?

   Thanks!
   Jona
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android Camera Preview Filter Using Camera.PreviewCallback.onPreviewFrame

2008-12-01 Thread Dave Sparks

The G1 preview format is YUV 420 semi-planar (U and V are subsampled
by 2 in both X and Y). The Y plane is first, followed by UV pairs - I
believe the U sample comes first in the pair.

Technically it's YCbCr 420 semi-planar, but very few people use that
term.

On Nov 26, 6:27 pm, dmanpearl [EMAIL PROTECTED] wrote:
 Hello Blindfold,

 Thanks for your help.  I solved the user interface problems I was
 experiencing by using a separate thread to do my image processing. I'm
 still using an ImageView, and without problems.  Perhaps I will try a
 Canvas in a SurfaceHolder later in this exercise to compare speeds.

 MORE ON THE CAMERA LIVE PREVIEW FILTERED DISPLAY CAPABILITY

 As you know, I want to display live camera data through a custom
 filter.

 I got most of the way through the YCbCr_422_SP data buffer returned to
 Android's Camera.PreviewCallback onCameraFrame() callback function,
 and now I am looking for help decyphering the U, V portion of the
 buffer.  I verified that the first (width*height) bytes are simple Y
 luminance values that can be displayed (via Bitmap and ImageView) to
 make a viable gray-scale image.  The total number of bytes are (width
 * height * 3 / 2).

 The remaining 1/2 image bytes are clearly used to store U, V (Cb, Cr)
 data.  Therefore, there are 1/4 image bytes for each U, V component
 (i.e. each U, V component is used for 4 pixels of the image).  This
 looks like 411 or 420 data, not 422, but we have bigger fish to fry.

 I cannot determine if the U V data is aligned adjacently, in
 alternating rows, or in squares as described in this Wikipedia
 graphical description:  http://en.wikipedia.org/wiki/Image:Yuv420.svg.
 Once I finally determine the structure of the U, V data, I have
 several equations to convert from YUV to RGB and I have tried many
 ways of combining the UV data with the luminance data of the first 2/3
 of the buffer to no avail.  So far I can only display mono-chrome.

 If you or others on this list can decode the Android YCbCr_422_SP
 data, please post the solution as soon as possible.  Your efforts and
 generosity are greatly appreciated.  I am convinced that
 representatives from Google/Android and others monitoring this list
 know how to do this.  Please share the information.  It is crutial to
 our project.  I do not care about the Emulator and it's different
 encoding.  I realize that Google is probably waiting to implement a
 unified solution and share it through an API update, but we cannot
 wait.

  - Thank you, David Manpearl

 On Nov 26, 10:23 am, blindfold [EMAIL PROTECTED] wrote:

  Hi David,

   I can't seem to make coexist: SurfaceHolder for the camera  ImageView
   for the filtered Bitmap to display.

  ...

   Do you know why I can't make the Camera's Surface and an ImageView
   Bitmap simultaneous members of the same active ViewGroup?

  I do not use ImageView myself so I cannot really judge your problem. I
  draw my filtered Bitmap to a Canvas in a SurfaceView. No ImageView
  anywhere.

  Regards
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Guitar Tuner

2008-12-01 Thread Dave Sparks

The current audio API's would make this very challenging. Look for
improvements in a future SDK.

On Nov 29, 12:10 pm, Ameer Ashanti [EMAIL PROTECTED] wrote:
 Is there anyone developing a guitar tuner for the android platform? or
 would that even be possible?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Ringtone.isPlaying problem

2008-12-01 Thread Dave Sparks

The phone application uses the RingtoneManager to play ringtones, so
it definitely works in that application. That doesn't mean it doesn't
have a bug, but I would suggest you check your code first.

On Nov 29, 3:41 pm, Selmi [EMAIL PROTECTED] wrote:
 hi, i hope there is someone who has some experience with ringtones

 in short, i open RingtoneManager and i choose ringtone from it using:

 mRingtone=mRingtoneManager.getRingtone(position);
 mRingtone.play();

 after some time i make following test:
 if(mRingtone!=null  mRingtone.isPlaying())
 {
 mRingtone.stop();
 mRingtone=null;}

 else
 {
   some action

 }

 problem is that mRingtone.isPlaying() always returns false, even if
 sound is still played!
 is it some problem in api, or did i misunderstood anything?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sending DTMF

2008-12-01 Thread Dave Sparks

The documentation for the ToneGenerator class clearly states that it
is for the purpose of generating tones on the near end. This is so the
user hears the tones when they push the digits on the keypad.

If you want to generate DTMF tones on the far end, you need to use the
PhoneManager API.

On Nov 30, 5:12 am, legerb [EMAIL PROTECTED] wrote:
 This actually didn't work on the real device.
 The tones can be heard playing on the handset, but not at the
 destination end.
 Using STREAM_VOICE_CALL did sound logic, but it doesn't work, and in
 that case i don't understand the purpose of it.

 On Nov 6, 12:11 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

  Hi,

  Did this actually work ?

  Did you try this on a real device ?
  (we dont have access to G1 devices here in Israel)

  TIA

  On Oct 5, 2:36 pm, legerb [EMAIL PROTECTED] wrote:

   I'm trying to send DTMF tones during outgoing call this way in my
   PhoneStateListener.
   Is this the right way to send DTMF - using the STREAM_VOICE_CALL.
   Also i want to send the DTMF sequence after the call is answered, so
   CALL_STATE_OFFHOOK doesn't seem to be right, what should be the
   appropriate state for sending?

   public void onCallStateChanged(int state, String incomingNumber) {
   // TODO Auto-generated method stub
   super.onCallStateChanged(state, incomingNumber);

   switch (state)
   {
   case TelephonyManager.CALL_STATE_OFFHOOK:

   ToneGenerator toneGenerator = new
   ToneGenerator(AudioManager.STREAM_VOICE_CALL,
   ToneGenerator.MAX_VOLUME1);
   
   toneGenerator.startTone(ToneGenerator.TONE_DTMF_1);
   toneGenerator.stopTone();
   
   toneGenerator.startTone(ToneGenerator.TONE_DTMF_2);
   toneGenerator.stopTone();
   break;
   }

   }

   On Oct 2, 11:02 am, legerb [EMAIL PROTECTED] wrote:

Is it possible to make a call and then send DTMF sequence in android
sdk 1.0?
I've seen the ToneGenerator and PhoneNumberUtils classes, but couldn't
find an option of sending DTMF...
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: MediaPlayer seek on startup

2008-12-01 Thread Dave Sparks

I can't think of any alternative solution at this time. The code that
handles this is in the OpenCore engine and not something you can
address with a Java API.

Perhaps this is something we can address in a future release.

On Nov 28, 1:22 pm, David Given [EMAIL PROTECTED] wrote:
 David Given wrote:
  I'm trying to play streaming music. The user has previously requested
  that the stream start a certain way into the stream. How do I do this?

 [...]

 Does anyone have any suggestions on how do this? If I can't make this
 work, my app is basically stuffed, and nothing I've tried is working.

 Brief summary: I need to be able to tell MediaPlayer to start playing
 from somewhere in the middle of the stream, not the start. If I call
 seekTo() after prepare() then the user has to wait for the buffer to be
 filled twice, which can take up to thirty seconds, and they're not going
 to put up with that.

 Is there a way to tell it to prepare the stream (reading the stream
 header, etc) but *not* to fill the buffer until I tell it to start
 playing? That would work.

 --
 ┌─── dg@cowlark.com ─http://www.cowlark.com─
 │
 │ ⍎'⎕',∊N⍴⊂S←'←⎕←(3=T)⋎M⋏2=T←⊃+/(V⌽⊂M),(V⊝M),(V,⌽V)⌽(V,V←1⎺1)⊝⊂M)'
 │ --- Conway's Game Of Life, in one line of APL

  signature.asc
  1KViewDownload
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: when will android support/have Speech Recognition System??

2008-12-01 Thread Dave Sparks

There is a speech reco engine in Android 1.0, but it is limited to use
in the voice dialer. The source code is available on
source.android.com.

On Nov 27, 6:18 am, Hui Tianshu (Risker) [EMAIL PROTECTED]
wrote:
 does anyone know any latest update for voice recognition in Android
 (android.speech.recognition) ?For sure Android 1.0 does not have it.

 Thanks
 Risker Hui

 On Oct 24, 1:02 am, Jakob Sachse [EMAIL PROTECTED] wrote:

  yesterday android was made open source, as you may know for sure.
  The websitehttp://source.android.comwasalso put online then.

  There is a youtube movie on the frontpage (http://www.youtube.com/
  watch?v=7Y4thikv-OM)
  that at 2:24min explicitly mentionsspeechrecognition,
  why would they do this if its not yet included?

  On 1 Okt., 18:51, hackbod [EMAIL PROTECTED] wrote:

   Nospeechrecognition in 1.0.

   On Oct 1, 7:02 am, Wesley [EMAIL PROTECTED] wrote:

Are u mean android not going to supportspeechrecognition???
But I saw a folder callspeechinside android.jar wo???
Others is working on???
Means I should ask...
Anyone is working on this system???
Can anyone share out??? Or open sources???

but if android have this system... I believe it will b very great new
to all the developer... Including me...

may I know... when can we have this system on hand inside android???

your attention is much appreciated... Thanks...

wesley.

On 10/1/08, MrSnowflake [EMAIL PROTECTED] wrote:

 I believe someone was working on such a library, but I've read it a
 couple months ago, so I'm not sure how it was called.

 On 30 sep, 03:51, Wesley Sagittarius [EMAIL PROTECTED] wrote:
 hi,

 when will android support/haveSpeechRecognition System??
 anyone have any ideas???

 Wesley.

--
Sent from Gmail for mobile | mobile.google.com
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: mp3s for games?

2008-12-01 Thread Dave Sparks

Decoding a single MP3 for a background audio track is not too bad. On
the G1, OGG is a better format, less memory overhead and startup
latency, plus you get seamless looping which MP3 does not do.

I don't recommend using compressed audio like MP3 or OGG if you have
lots of sound effects, because of the CPU overhead in decompressing
them.

On Nov 27, 10:18 am, Craig [EMAIL PROTECTED] wrote:
 I'm making a game, and I have an mp3 I would like to use to play in a
 loop for this game. This mp3 is several times larger than a midi file
 would be, but recreating my mp3 as a midi has proven to be a non-
 trivial task.

 What would the effects be of just using an mp3 of a few hundred kb in
 size instead of a midi file of around 10kb in size? I.e., would
 downloading the larger game be much of an issue? Would there be any
 significant penalties in performance or resource usage?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to obtain meda-data (like bit rate) from audio files ?

2008-12-01 Thread Dave Sparks

It's on the TO-DO list, but not targeted for any release at this
time.

On Dec 1, 12:37 pm, AP08 [EMAIL PROTECTED] wrote:
 Thank you for the response Dave. Would you know of any plans to
 support these ?

 On Nov 25, 12:15 pm, Dave Sparks [EMAIL PROTECTED] wrote:

  The metadata retriever currently doesn't support that level of
  detail.

  On Nov 24, 12:09 pm,AP08[EMAIL PROTECTED] wrote:

   I checked android.provider.MediaStore.Audio.Media, but it can provide
   only limited data about audio file. I want to obtain data such as bit-
   rate, how do I get that ?

   thanks,
   AP- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Music file format supported by Android

2008-12-02 Thread Dave Sparks

MP3 (CBR and VBR up to 320Kbps), M4A (AAC LC, AAC, AAC+, enhanced AAC
+), OGG, 3GP (AMR-NB and AMR-WB), WAVE (8/16-bit PCM) and MIDI
(SMF0/1, XMF0/1, RTTTL/RTX, OTA, iMelody).

On Dec 2, 12:14 am, Jatin [EMAIL PROTECTED] wrote:
 Hello,
  Can u please let me know the list of the Music file format supported
 by Android and the Music Player supported by Android.

 Thanks,
 Jatin
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Capturing frames form MediaPlayer

2008-12-03 Thread Dave Sparks

The next SDK release will have a feature for grabbing a video
thumbnail.

You can't grab the video frame buffer because it isn't mapped into the
application memory space. I suspect an app with the right privileges
could take a screenshot, but I don't know the details of how that
works.

On Dec 3, 9:55 am, Robert [EMAIL PROTECTED] wrote:
 I am able to successfully play a video using MediaPlayer on my
 emulator. I would like to know if there is any supported functionality
 that can take a screen grab and save it to a Bitmap given a seekTo
 time?

 Thanks in advance,
 Robert
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Distorted Images taken from Camera

2008-12-03 Thread Dave Sparks

It's not easy to debug code we haven't seen. Can you post a snippet?

On Dec 3, 1:42 pm, ryan84c [EMAIL PROTECTED] wrote:
 Hi,

 I'm trying to develop an Android app that will allow users to take
 pictures. I've tried just about every sample out there, but one
 problem I keep having is all my image are being distorted. Has anyone
 ever had this problem? This only happens when I take a picture using
 my source code. The camera works fine when I run the camera app and
 take pictures with it. But any code of mine produces bad images.

 Any help is GREATLY appreciated.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: TabActivity vs VideoView vs Camera Preview contention

2008-12-03 Thread Dave Sparks

I'm sure this is an artifact of the way we handle video overlays -
they are treated differently than a regular surface. If I understand
the behavior, I would agree that it's a bug.

As a workaround, you will probably need to tear down the VideoView.
For camera preview, you should be able to get away just clearing the
preview surface.

On Dec 3, 5:36 pm, Jason Proctor [EMAIL PROTECTED] wrote:
 i'm looking at the source for TabHost and it turns out that when a
 tab is selected, its view is set to visibility GONE. hence me setting
 it to INVISIBLE afterwards probably isn't helping!

 either way, i think making a SurfaceView GONE should probably stop it
 claiming chunks of screen and interfering with other views which are
 definitely VISIBLE.

 does the panel agree that this is a bug?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Play Video Files in Android

2008-12-03 Thread Dave Sparks

If you want a video player app for your G1, there are several
available for free in the Market.

If you are looking for sample code, check out the SDK sample code.
There are also several workable snippets posted in various messages on
this list.

On Dec 3, 9:19 pm, Jatin [EMAIL PROTECTED] wrote:
 Hello,

 Please let me know how to play the Video Files in the Media Palyer of
 the Android.
 I have push the .mp4 file inside the SD Card.

 Jatin
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: TabActivity vs VideoView vs Camera Preview contention

2008-12-03 Thread Dave Sparks

The black screen is probably the result of the 2D engine trying to
composite from an empty camera preview frame buffer.

The video push buffer surfaces were a late addition to SurfaceFlinger
to facilitate the use of video hardware pipelines. I'm not surprised
there are some rough edges because it didn't get any testing outside
of the basic use cases.

I suggest you log a bug. If you have a code snippet that demonstrates
the problem, that would be even better.

On Dec 3, 7:04 pm, Jason Proctor [EMAIL PROTECTED] wrote:
 another quite alarming detail is that if i initially remove the video
 view from its tab in my activity's onCreate(), then that results in a
 black screen where the camera preview should be. if i leave the video
 view installed, then the preview works fine.

 this is somewhat baffling!
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: audio recording issues

2008-12-04 Thread Dave Sparks

The reason this isn't in 1.0 is because we didn't want to ship a half-
baked API. We have a solution coming soon in the form of a flexible
base layer that supports push and pull models. For example, we have
built an InputStream object on top of it that we will offer as sample
code.

In the future, this development will be taking place in the open
source repo so we can have a real-time dialog about the code as it is
developed. In the meantime, we are working hard to get the code that
has been in development since we forked the 1.0 branch moved into the
open source repo as soon as possible.

On Dec 4, 6:40 pm, MichaelEGR [EMAIL PROTECTED] wrote:
 On Dec 2, 5:22 am, Dorn Hetzel [EMAIL PROTECTED] wrote:

  Maybe we need to start another mailing list for unrequited android
  realtimeaudio:)

 I'm all for focused discussion on this topic as it crosses between
 native concerns and public APIs via the SDK. In my longer original
 post I mentioned that it would be appropriate to evaluate how to not
 only getting something workable on the G1, but keep in mind that
 Android can/will be used in the future conceivably beyond smart phones
 in devices/hardware that may support expanded audio I/O options. I
 favor PortAudio (www.portaudio.com) for the task as it can provide a
 workable real time audio API for desktop Java and Android audio
 development/porting to other hardware configurations. It is also low
 level enough to say even implement javax.sound on top of it for those
 interested in that particular API. More discussion is welcome
 especially in understanding unspecified work being done for the next
 SDK release.

 Best,
 --Mike
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Debug android source code

2008-12-05 Thread Dave Sparks

This list is for discussing application development. Discussion of
porting, extending, and debugging the Android source code should take
place on the open source mailing lists (android-platform, android-
framework, android-porting, or android-kernel).

On Dec 4, 11:50 pm, Yogi [EMAIL PROTECTED] wrote:
 Hi All,

 I want to debug android codec source code and want to know how the
 audio/video graph is build.
 Can we debug the codec source code with the help of ADB?
 Please help me out.

 Thanks in advance,
 Yogi
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OpenAL

2008-12-08 Thread Dave Sparks

Android does not have support for OpenAL at this time. The G1 and
iPhone chipsets are not the same, and even if they were, the software
stacks are different.

On Dec 8, 8:15 am, reillyse [EMAIL PROTECTED] wrote:
 Hi All,
 I've been searching for 3D audio support on the Android
 platform. I've used openAL on other platforms (IPhone and Linux) but I
 can't find any mention of it in the android docs. Is there another way
 to do 3d sound on the android platform ? I know openAL is open source
 and correct me if I'm wrong but I thought the audio chips in iphone
 and G1 were the same, so is there any barrier to using openal on the
 android platform  ?

 regards,

 Sean
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: audio recording issues

2008-12-08 Thread Dave Sparks

I can only tell you that the feature is done. The timing of when you
see a device in the field that supports it is up to the deployment
manager.

It's important to remember that Android is a platform, and just
because the platform advances doesn't necessarily mean that all
devices are advancing in lockstep. Each deployment manager will make
choices based on their own business case. For example, the G1 has
different deployments based on region.

On Dec 8, 6:49 am, Dorn Hetzel [EMAIL PROTECTED] wrote:
 While I am sure any forward looking statement will need to be taken
 with a grain of salt, perhaps you could alleviate many of our concerns
 with some clue as to the timeframe in which we might expect relief on
 this front.  If we knew that in a month or two we could look forward
 to at least rudimentary real-time audio we could quit expending energy
 on trying to scheme a workaround and just delay our application plans.
  If it's going to be a lot longer than that, we can make appropriate
 decisions as well.  Leaving us knowing nothing doesn't really engender
 confidence.  Some sort of roadmap with approximate dates would help a
 lot!

 Regards,

 Dorn Hetzel

 On Fri, Dec 5, 2008 at 12:12 AM, Dave Sparks [EMAIL PROTECTED] wrote:

  The reason this isn't in 1.0 is because we didn't want to ship a half-
  baked API. We have a solution coming soon in the form of a flexible
  base layer that supports push and pull models. For example, we have
  built an InputStream object on top of it that we will offer as sample
  code.

  In the future, this development will be taking place in the open
  source repo so we can have a real-time dialog about the code as it is
  developed. In the meantime, we are working hard to get the code that
  has been in development since we forked the 1.0 branch moved into the
  open source repo as soon as possible.

  On Dec 4, 6:40 pm, MichaelEGR [EMAIL PROTECTED] wrote:
  On Dec 2, 5:22 am, Dorn Hetzel [EMAIL PROTECTED] wrote:

   Maybe we need to start another mailing list for unrequited android
   realtimeaudio:)

  I'm all for focused discussion on this topic as it crosses between
  native concerns and public APIs via the SDK. In my longer original
  post I mentioned that it would be appropriate to evaluate how to not
  only getting something workable on the G1, but keep in mind that
  Android can/will be used in the future conceivably beyond smart phones
  in devices/hardware that may support expanded audio I/O options. I
  favor PortAudio (www.portaudio.com) for the task as it can provide a
  workable real time audio API for desktop Java and Android audio
  development/porting to other hardware configurations. It is also low
  level enough to say even implement javax.sound on top of it for those
  interested in that particular API. More discussion is welcome
  especially in understanding unspecified work being done for the next
  SDK release.

  Best,
  --Mike
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem debugging the application -MediaPlayer

2008-12-08 Thread Dave Sparks

I'm not a Java developer, but this seems like a problem in your
manifest.

On Dec 6, 1:37 pm, sam [EMAIL PROTECTED] wrote:
 I'm on the 1.0 SDK and I'm having the exact same problem... I spent a
 few hours on the forums  googling, but the only suggestion I can find
 is to make sure you call setContentView(...) before you call
 findViewById. I can't seem to get past this -- I can't lookup any of
 my views from onCreate. Posting relevant portion of main activity --
 am I doing anything stupid/wrong here?

 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);

 Button btn = (Button)this.findViewById(R.id.btn_about);   /*
 RuntimeException here */
 if(btn != null)
 {
 return; /* set a breakpoint here*/
 }
 }

 Thanks

 Sam

 On Nov 19, 11:23 am, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  Start by downloading the current SDK 1.0. Then take a look at the
  sample code posted on this forum.

  On Nov 19, 12:29 am, Dagger [EMAIL PROTECTED] wrote:

   Some one help I am using 0.9 SDK

   On Nov 19, 12:58 pm, Dagger [EMAIL PROTECTED] wrote:

I am having the same problem but I am only implementing the Activity
Class which is included in the package by default.
THis is the partial code.

public class ActiveOctave extends Activity implements OnErrorListener,
OnBufferingUpdateListener, OnCompletionListener,
OnPreparedListener, SurfaceHolder.Callback {

private static final String TAG = VideoPlayer;
private MediaPlayer mp;
private SurfaceView mPreview;
private EditText mPath;
private SurfaceHolder holder;
private ImageButton mPlay;
private ImageButton mPause;
private ImageButton mReset;
private ImageButton mStop;
private String current;
/**
 * Called when the activity is first created.
 */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.main);
// Set up the play/pause/reset/stop buttons
mPreview = (SurfaceView) findViewById(R.id.surface);
mPath = (EditText) findViewById(R.id.path);
mPlay = (ImageButton) findViewById(R.id.play);
mPause = (ImageButton) findViewById(R.id.pause);
mReset = (ImageButton) findViewById(R.id.reset);
mStop = (ImageButton) findViewById(R.id.stop);

This is my Debug Stack.
Thread [3 main] (Suspended (exception RuntimeException))
ActivityThread.performLaunchActivity(ActivityThread
$ActivityRecord)
line: 2131
ActivityThread.handleLaunchActivity(ActivityThread
$ActivityRecord)
line: 2147
ActivityThread.access$1800(ActivityThread, ActivityThread
$ActivityRecord) line: 112
ActivityThread$H.handleMessage(Message) line: 1572
ActivityThread$H(Handler).dispatchMessage(Message) line: 88
Looper.loop() line: 123
ActivityThread.main(String[]) line: 3708
Method.invokeNative(Object, Object[], Class, Class[], Class,
int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 492
ZygoteInit$MethodAndArgsCaller.run() line: 734
ZygoteInit.main(String[]) line: 492
NativeStart.main(String[]) line: not available [native method]

Please help what to Do.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: MediaPlayer and onSaveInstanceState?

2008-12-08 Thread Dave Sparks

The HTTP session isn't controlled by the Java application, the media
framework has its own HTTP client.

The Java proxy object for the network session is the MediaPlayer
object which is owned by VideoView. You could retain a reference to
the VideoView object across the orientation change, so that it keeps
its internal MediaPlayer reference. You need to be careful because
holding on to a MediaPlayer object can have significant implications
on battery life, so you want to make sure you release it if your
activity no longer has the focus.

Unfortunately, the current VideoView design doesn't work well for
restoring state because it starts playing immediately after setVideoURI
().

On Dec 7, 12:59 am, ben rosenberg [EMAIL PROTECTED] wrote:
 hey folks,

 to make a long story short, I'm working on an app that plays streaming
 video content in a VideoView with a MediaController; Im wondering how
 I can preserve the state of my VideoView across orientation changes,
 such that opening the keyboard doesn't restart the playback, etc..

 I've been messing around with onSaveInstanceState, but Im fairly
 certain I'm missing something (possibly Parcelized objects?) ..
 Ideally i think I'd like to save and restore the state of the
 MediaPlayer,  as well as an HttpClient (or at least its cookiejar) ...
 I suspect this will have to be done with Parcelables, but I don't
 quite have my head around how those work (and the Notepad example
 hasn't helped)..

 any suggestions, or especially code or pseudocode examples, would be
 greatly apprectiated
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OpenAL

2008-12-09 Thread Dave Sparks

There is no 3D audio support in the G1, and it's unlikely that it will
ever have more than rudimentary support for 3D audio (2D pan,
distance, and doppler, and maybe basic environmental effects).

I expect that future Android devices will have better 3D capability,
but it's too early to project when that might happen.

On Dec 9, 6:55 am, reillyse [EMAIL PROTECTED] wrote:
 ok, so is there any way to do 3D audio on the G1 ?

 regards

 Sean

 On Dec 8, 4:41 pm, Dave Sparks [EMAIL PROTECTED] wrote:

  Android does not have support for OpenAL at this time. The G1 and
  iPhone chipsets are not the same, and even if they were, the software
  stacks are different.

  On Dec 8, 8:15 am, reillyse [EMAIL PROTECTED] wrote:

   Hi All,
   I've been searching for 3D audio support on the Android
   platform. I've used openAL on other platforms (IPhone and Linux) but I
   can't find any mention of it in the android docs. Is there another way
   to do 3d sound on the android platform ? I know openAL is open source
   and correct me if I'm wrong but I thought the audio chips in iphone
   and G1 were the same, so is there any barrier to using openal on the
   android platform  ?

   regards,

   Sean
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: MediaPlayer and onSaveInstanceState?

2008-12-09 Thread Dave Sparks

I learned something new! Thanks, Dianne.

On Dec 8, 7:24 pm, Dianne Hackborn [EMAIL PROTECTED] wrote:
 You can use Activity.onRetainNonConfigurationInstance() to transfer an
 active object across activity instances.  Just be careful that the object
 doesn't continue referencing the old activity.

 On Sun, Dec 7, 2008 at 12:59 AM, ben rosenberg [EMAIL PROTECTED]wrote:





  hey folks,

  to make a long story short, I'm working on an app that plays streaming
  video content in a VideoView with a MediaController; Im wondering how
  I can preserve the state of my VideoView across orientation changes,
  such that opening the keyboard doesn't restart the playback, etc..

  I've been messing around with onSaveInstanceState, but Im fairly
  certain I'm missing something (possibly Parcelized objects?) ..
  Ideally i think I'd like to save and restore the state of the
  MediaPlayer,  as well as an HttpClient (or at least its cookiejar) ...
  I suspect this will have to be done with Parcelables, but I don't
  quite have my head around how those work (and the Notepad example
  hasn't helped)..

  any suggestions, or especially code or pseudocode examples, would be
  greatly apprectiated

 --
 Dianne Hackborn
 Android framework engineer
 [EMAIL PROTECTED]

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  All such questions should be posted on public
 forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How To Start a RTSP connection

2008-12-10 Thread Dave Sparks

MediaPlayer m = new MediaPlayer();

m.setDataSource(rtsp://rtsp.yourserver.com/stream.mp3);
m.prepare();
m.start();

You probably want to call the prepare() statement from something other
than your UI thread, because it may take awhile. Alternatively, you
can call prepareAsync() and call start() from the onPreparedListener.

On Dec 9, 12:42 pm, Jona [EMAIL PROTECTED] wrote:
 Could someone help me figure out how to initialize the MediaPlayer to
 play an RTSP link?  The link is only audio there is no video... would
 this matter?

 Thanksin Advance!!!

 Jona
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: detect earphone

2008-12-10 Thread Dave Sparks

You want to register to receive Intent.ACTION_HEADSET_PLUG from
package android.content. Check out:

http://code.google.com/android/reference/android/content/Intent.html

On Dec 10, 2:38 am, eric [EMAIL PROTECTED] wrote:
 Hello,
 Anyone know how to detect if the ugly earphone has been plugged? Any
 API related to this? thanks!
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: More MediaPlayer questions

2008-12-10 Thread Dave Sparks

You want some code like this to play from raw resources:

AssetFileDescriptor afd = getResources().openRawResourceFd
(R.raw.test);
if (afd != null) {
mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(),
afd.getLength());
} else {
throw new IOException(Unable to open test file);
}

I don't quite grok what you want to do with the music player. Is your
app in the foreground while the music player is in the background? If
so and you aren't using any elements of the music player UI, why not
just create your own music player inside the app that you can control?

There is a headset button interface you might be able to inject events
into to get the music player to pause and resume if you have to go
that way to get the UI. It's not going to give you very fine-grained
control over timing.

If the user is on a call, your application does not have focus and you
should not be doing anything. That said, the user could bring your app
to the fore while on the call and start playing with it. My view on
that is to let them do it, so we allow users to pull up YouTube or the
music player and use them while still on the call. There is an API to
detect if the ringtone is playing or the user is on a call - I believe
it's in android.media.AudioService, but I could be wrong.

We're working on improved docs for the media framework. Generally,
there's a pretty strict regiment you have to follow to get from a new
MediaPlayer object to the playing state:

MediaPlayer m = new MediaPlayer();
m.setDataSource(uri);
m.setAudioStreamType(streamType);
m.prepare(); // or prepareAsync() and wait for OnPrepared to fire

// setDataSource and setAudioStreamType are no longered allowed unless
after reset()
// getDuration, getCurrentPosition, setLooping, setVolume, isPlaying
are all valid now

m.start();

// now you can also pause, start, seekTo (paused or playing), and
stop.

reset() is valid in any state, though we have a bug in RC30 if you
haven't take a media player to prepare state, the app thread will
deadlock in reset(). Will be fixed in a release soon.

Hope this helps.

On Dec 10, 6:01 pm, Greg [EMAIL PROTECTED] wrote:
 I've been googling and searching the groups for answers and haven't
 been able to find anything concrete.  I have several questions
 regarding the use of MediaPlayer if somebody can help me out:

 1. I need to package an audio resource with my application, which I
 have done in /res/raw.  However, it appears that I must use
 MediaPlayer.create() to use a resource ID rather than
 MediaPlayer.setDataSource().  I found some references to creating a
 URI to raw via android:resource://package/raw/name and
 android:resource//package/ + resourceId.   However, both of these
 tries resulted in IOExceptions during setDataSource.  I'm assuming due
 to a bad URI.  Is it possible to get a valid URI in SDK 1.0 that will
 point to a raw resource?

 2. I'm writing an app that does some tracking and will typically go
 hand in hand with the music player running.  Part of my app will, at
 times, need to play sound on top of the running audio stream.  Is
 there any way for my app to get ahold of and temporarily pause the
 music stream so that the user will be able to clearly hear my audio?
 Is this prevented because it's considered 'bad behavior'?  (I hope not
 because in my case its actually good and desirable behavior)

 3. I see that I can set the audio stream but is there any
 documentation/discussion/details on what the various streams are, how
 they are used, and how they interact with one another?   For example,
 as mentioned above I want to be able to pause/override/interrupt a
 music playing stream with my notification but I would NOT want to have
 my notification play if they are on an active phone call.   Also, is
 there any doc/discussion/detail on which methods can be invoked on the
 mediaplayer at what times?  As I experiment I seem to get a lot of
 'invalid media state' errors when I try things with very little
 indication as to what state it is in and how I get it from the bad
 state to an acceptable state for the method in question.

 Thanks for any assistance.  I've been researching for a couple of days
 but all the information I can find is very sparse or appears to be
 things that were valid in early SDKs but may not be any longer.

 Thanks,

 Greg
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: youtube player question

2008-12-11 Thread Dave Sparks

Do you really mean YouTube player, or are you referring to the media
player?

In any case, the emulator is using the ARM-optimized software codecs
running in QEMU ARM emulation on your workstation. The performance is
not going to be spectacular.

On the G1, the AVC codec runs on the DSP, so the performance is better
than the other video codecs.

On Dec 11, 1:30 am, Wei twc0...@gmail.com wrote:
 Hi all,

 I have few question about the youtube player.
 Running the youtube player on G1.
 The video play smoothly. (http://www.jkontherun.com/2008/10/video-of-
 yout-1.html)
 Is anyone know what codec used by youtube player?
 Is use opencore code?
 If yes, why the opencore can not play smoothly in the android
 emulator?

 ~ Wei
--~--~-~--~~~---~--~~
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: More MediaPlayer questions

2008-12-11 Thread Dave Sparks

I'm beginning to grok the fullness... :)

You could use the ALARM stream, though the user might have silenced
alarms and then nothing will be heard.

We are adding the ability to send events to the music player to tell
it to play, pause, skip, etc. to support AVRCP. This will come in a
release in Q1. That seems like the ideal way to hook your app in, and
hopefully 3rd party music player apps will pick up on this as well.

On Dec 11, 7:13 am, Greg gregory.r.fie...@gmail.com wrote:
 Thanks for the info Dave (especially getting call for the raw file
 descriptor!).

 Allow me to help you grok the fullness of this  (wonder how many
 people have actually read that book these days) :)  My app actually
 runs in foreground and background (via service) for doing some
 exercise tracking.  As someone is out moving about they may start my
 app, set things up, and start tracking then leave the app.  The
 service is in background paying attention to what its supposed to
 (GPS, calculations, etc.) and at certain intervals needs to 'read out'
 some statistics.

 I don't want to build my own mp3 player in the app because it's a) not
 what I want to focus on and b) not going to be as good as everything
 else that is already out there.  I would much prefer to just play
 nicely with existing mp3 apps.  The only requirement I would have is
 this one ability to either play my notification over the audio stream
 louder than the music or (preferably) suspend/pause the music stream
 to play my notification, then resume the other streams.

 The phone could be in one of several states:

 1. MP3 player playing, my app in foreground, my app service running.
 2. MP3 player in foreground, my app gone, my app service running.
 3. Some other app in foreground (on a call maybe), my app gone, my app
 service running.

 Again what I'm looking for here is the best way for my notifications
 to interrupt any current audio stream (except a phone call) that is
 going on as long as my service is active.  (If my service is active in
 background, then the user wants to hear these notifications)

 Do the audio stream types interact/override one another?  If I put my
 player in the ALARM type will that stop/play louder than the MUSIC
 type?

 Thanks!

 Greg
--~--~-~--~~~---~--~~
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: How to control a sound notification duration?

2008-12-12 Thread Dave Sparks

The length of the notification sound determines the length. You can
select persistent if you want the sound to play until the user
dismisses it.

You can cancel a notification, so you could conceivably send your self
a delayed message to cancel a notification after a period of time.

On Dec 12, 2:00 am, elDoudou the.edouard.merc...@gmail.com wrote:
 Maybe my request was not clear enough: is there a way to indicate for
 how long a sound is played when a sound-based notification is
 triggered, please?

 Thank you,
 Édouard
--~--~-~--~~~---~--~~
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: google contact ?

2008-12-12 Thread Dave Sparks

We are aware of the issues in the Market and they will be addressed
soon.

On Dec 12, 7:42 am, Jeff jlb...@gmail.com wrote:
 Is there a way that a developer can speak to someone at google?

 Is there a way that a developer can make a request to email?  e.g.,
 removing rating that contain abusive language form the rating?  Sicko
 are using the rating system to publish dirty word.

 thanks,

 Jeff
--~--~-~--~~~---~--~~
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: How to control a sound notification duration?

2008-12-13 Thread Dave Sparks

Some of the ringtones contain special metadata to make them loop.
These sounds will play forever and aren't appropriate for
notifications. Unless you want really annoy your users. :)

The notifications directory has sounds that don't loop.

On Dec 13, 12:02 am, elDoudou the.edouard.merc...@gmail.com wrote:
 Thank you for the information.

 I was mislead because the Android built-in ring tones under 'system/
 media/audio/ringtones' seem to loop when played. Yes, the idea of
 scheduling an alert for cancelling the notification is a solution, if
 the sound is looping.
--~--~-~--~~~---~--~~
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: MediaStore.Images.Media.INTER NAL_CONTENT¨_URI

2008-12-15 Thread Dave Sparks

http://code.google.com/android/reference/android/content/Intent.html#ACTION_MEDIA_SCANNER_SCAN_FILE

On Dec 14, 2:56 pm, jphdsn jph...@gmail.com wrote:
 hi,

 how put images in

 MediaStore.Images.Media.INTERNAL_CONTENT¨_URI

 thanks
--~--~-~--~~~---~--~~
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: generating keypad tones

2008-12-15 Thread Dave Sparks

If you're asking how to use the G1, you should post your question in
android-discuss. This forum is about programming for Android, the
software platform that runs on the G1.

Having said that, I think you're looking for the touch tone dialer
which is the little JKL tab at the bottom of the screen while you're
in the call. Press it, like you do the home screen tab, and the DTMF
dialer will pop up.

On Dec 14, 9:56 pm, shweta kumari shweta.n...@gmail.com wrote:
 Hi,

 The audio touch tone is enabled on the phone.But when I press any key I am
 not able to get the tone.How are the keypad tones generated?

 Thanks,
 Shweta
--~--~-~--~~~---~--~~
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: How to generate tones for keys

2008-12-15 Thread Dave Sparks

When you are in a call, press the JKL tab at the bottom of the screen
to bring up the DTMF dial pad. This will generate DTMF tones over the
radio as well as generate tones for the user to hear locally (unless
the user has disabled the local tones in the Sound/Display settings).

On Dec 15, 8:49 pm, shweta kumari shweta.n...@gmail.com wrote:
 Hi,

 Does android support tones when the keys are pressed? Moreover when I press
 any key on the device I dont see any message in logcat.Is it possible to get
 these messages?

 Thanks,
 Shweta
--~--~-~--~~~---~--~~
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: How to generate tones for keys

2008-12-15 Thread Dave Sparks

The radio firmware generates the tones for the far end. The local
tones are generated algorithmically on the app processor. See
ToneGenerator.

On Dec 15, 10:55 pm, Mihai mihai...@gmail.com wrote:
 Hi,

   I would also be interested in something like this - so I would like
 to ask if the G1 has an oscillator and if Android has a way of working
 with that?

 Thanks,
 Mihai

 On Dec 16, 6:49 am, shweta kumari shweta.n...@gmail.com wrote:

  Hi,

  Does android support tones when the keys are pressed? Moreover when I press
  any key on the device I dont see any message in logcat.Is it possible to get
  these messages?

  Thanks,
  Shweta
--~--~-~--~~~---~--~~
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: Phone crash on volume key

2008-12-16 Thread Dave Sparks

It sounds like your application is not releasing its media player
resources. When you're done playing a sound, you need to call the
MediaPlayer.release() method. If you're playing a lot of sounds
rapidly, the garbage collector won't be able to keep up.

Arguably, the runtime shouldn't reboot. I think we have a fix for this
in the next release.

On Dec 16, 11:35 am, bleucalme bleuca...@gmail.com wrote:
 Hi,

 In my application (SDK 1.0.r2), after playing few sounds, I loose
 the sounds. If I touch the volume keys, the device reboots. I get the
 same behavior on the emulator. Anybody had the same problem?

 12-16 14:15:49.892: ERROR/AudioFlinger(24): no more track names
 availlable
 12-16 14:15:49.892: ERROR/AudioTrack(24): Could not get control block
 12-16 14:15:49.892: ERROR/AudioSink(24): Unable to create audio track
 12-16 14:15:49.892: ERROR/VorbisPlayer(24): mAudioSink open failed
 12-16 14:16:15.661: ERROR/AudioFlinger(24): no more track names
 availlable
 12-16 14:16:15.672: ERROR/AudioTrack(24): Could not get control block
 12-16 14:16:15.672: ERROR/AudioSink(24): Unable to create audio track
 12-16 14:16:15.672: ERROR/VorbisPlayer(24): mAudioSink open failed
 12-16 14:16:50.431: DEBUG/VolumePanel(48): onVolumeChanged(streamType:
 2, flags: 17)
 12-16 14:16:50.431: DEBUG/VolumePanel(48): onShowVolumeChanged
 (streamType: 2, flags: 17), index: 6
 12-16 14:16:50.431: DEBUG/VolumePanel(48): setRingerIcon(index: 6),
 ringerMode: 2
 12-16 14:16:50.461: INFO/NotificationService(48): enqueueToast
 pkg=android callback=android.widget.toast...@433f8408 duration=0
 12-16 14:16:50.621: DEBUG/VolumePanel(48): onVolumeChanged(streamType:
 2, flags: 4)
 12-16 14:16:50.931: ERROR/AudioFlinger(24): no more track names
 availlable
 12-16 14:16:50.931: ERROR/AudioTrack(48): Could not get control block
 12-16 14:16:50.931: ERROR/ToneGenerator(48): AudioTrack-initCheck
 failed
 12-16 14:16:50.931: ERROR/ToneGenerator(48): ToneGenerator init
 failed
 12-16 14:16:50.931: WARN/dalvikvm(48): threadid=15: thread exiting
 with uncaught exception (group=0x40010e28)
 12-16 14:16:50.931: ERROR/AndroidRuntime(48): Uncaught handler: thread
 android.server.ServerThread exiting due to uncaught exception
 12-16 14:16:50.931: ERROR/AndroidRuntime(48): *** EXCEPTION IN SYSTEM
 PROCESS.  System will crash.
 12-16 14:16:50.950: ERROR/AndroidRuntime(48):
 java.lang.RuntimeException: Init failed
 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at
 android.media.ToneGenerator.native_setup(Native Method)
 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at
 android.media.ToneGenerator.init(ToneGenerator.java:225)
 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at
 android.view.VolumePanel.getOrCreateToneGenerator(VolumePanel.java:
 258)
 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at
 android.view.VolumePanel.onPlaySound(VolumePanel.java:223)
 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at
 android.view.VolumePanel.handleMessage(VolumePanel.java:329)
 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at
 android.os.Handler.dispatchMessage(Handler.java:88)
 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at
 android.os.Looper.loop(Looper.java:123)
 12-16 14:16:50.950: ERROR/AndroidRuntime(48): at
 com.android.server.ServerThread.run(SystemServer.java:308)
 12-16 14:16:51.052: INFO/Process(48): Sending signal. PID: 48 SIG: 9
--~--~-~--~~~---~--~~
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: More MediaPlayer questions

2008-12-17 Thread Dave Sparks

The media server does not have access to your application's data
directory for security reasons. If you want the media server to play a
file in your data directory, you need to open the file in your app and
use the setDataSource(fd) method to pass open file descriptor to media
player.

Alternatively, you can copy the data files to the SD card and play by
path.

On Dec 16, 10:59 pm, kavith...@gmail.com kavithachitr...@gmail.com
wrote:
 Hii Greg,

 How to create a url to raw via android:resource://package/raw/name as
 you have said?

 as setDataSource(url) is not working i copied a file to local path and
 tried passing that path to setDataSource(path),even that gives error

 Please tell me how to copy file directly to raw from url.
 This is very urgent for me.

 Thanks
 Kavitha

 On Dec 10, 6:01 pm, Greg gregory.r.fie...@gmail.com wrote:

  I've been googling and searching the groups for answers and haven't
  been able to find anything concrete.  I have several questions
  regarding the use of MediaPlayer if somebody can help me out:

  1. I need to package an audio resource with my application, which I
  have done in /res/raw.  However, it appears that I must use
  MediaPlayer.create() to use a resource ID rather than
  MediaPlayer.setDataSource().  I found some references to creating a
  URI to raw via android:resource://package/raw/name and
  android:resource//package/ + resourceId.   However, both of these
  tries resulted in IOExceptions during setDataSource.  I'm assuming due
  to a bad URI.  Is it possible to get a valid URI in SDK 1.0 that will
  point to a raw resource?

  2. I'm writing an app that does some tracking and will typically go
  hand in hand with the music player running.  Part of my app will, at
  times, need to play sound on top of the running audio stream.  Is
  there any way for my app to get ahold of and temporarily pause the
  music stream so that the user will be able to clearly hear my audio?
  Is this prevented because it's considered 'bad behavior'?  (I hope not
  because in my case its actually good and desirable behavior)

  3. I see that I can set the audio stream but is there any
  documentation/discussion/details on what the various streams are, how
  they are used, and how they interact with one another?   For example,
  as mentioned above I want to be able to pause/override/interrupt a
  music playing stream with my notification but I would NOT want to have
  my notification play if they are on an active phone call.   Also, is
  there any doc/discussion/detail on which methods can be invoked on the
  mediaplayer at what times?  As I experiment I seem to get a lot of
  'invalid media state' errors when I try things with very little
  indication as to what state it is in and how I get it from the bad
  state to an acceptable state for the method in question.

  Thanks for any assistance.  I've been researching for a couple of days
  but all the information I can find is very sparse or appears to be
  things that were valid in early SDKs but may not be any longer.

  Thanks,

  Greg
--~--~-~--~~~---~--~~
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: How to support VideoPhone ?

2008-12-17 Thread Dave Sparks

Video telephony was not a priority for the markets that we launched in
this year. OpenCore will have a H.324M stack in 2009.

However, VT is a complex function that requires close cooperation
between RIL and media stack. Even though Android will have an open
source VT stack, there will still be a fair bit of work required to
implement it on your hardware.

On Dec 17, 9:12 pm, JBQ jb...@huawei.com wrote:
 VideoPHone is a important function in 3g service,I donot know why
 android cannot apply it ?Videophone is consist of h.324 and
 camcoder.camcoder may be h263 or mp4.All of the work is big for
 developer,Does somebody know if android has any plan on it?
--~--~-~--~~~---~--~~
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: ID3 Tag

2008-12-18 Thread Dave Sparks

The media scanner automatically extracts metadata from any file that
it recognizes on the SD card. Can you be more explicit about your use
case?

On Oct 24, 6:45 am, CiprianU ch3l...@gmail.com wrote:
 Hy guys,

 Can you tell me how can I extract the ID3 tags from an mp3 file, using
 Android of course.

 Thanks in advance.
--~--~-~--~~~---~--~~
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: How To Start a RTSP connection

2008-12-18 Thread Dave Sparks

I can only guess that the RTSP client in OpenCore didn't like
something it found the DESCRIBE response. I'm not sure that it can
handle broadcast mode. Maybe someone from PV will be able to provide
some insight.

Did you get an error message back from the MediaPlayer through
onErrorListener?

On Dec 18, 6:35 am, Jona medicalsou...@hotmail.com wrote:
 Hi Dave,
 I have tried opening the link using the Live555 Media Server to
 broadcast the mp3 track.  This broadcast is accessible anywere on the
 internet and as well my local network.  I tried accessing via my
 wireless connection and using WireShark to record communication and I
 could see the first two messages from the MediaPlayer.  OPTIONS, and
 DESCRIBE.

 My server replied back but a SETUP message was never returned any
 ideas? Here is my log.

 C-S:
 OPTIONS rtsp://76.117.125.33:554/one.mp3 RTSP/1.0
 CSeq: 0
 User-Agent: PVCore/05.02.00.00 PVPlayer/6.18 (Linux; Android; NJ)
 ClientChallenge: 9e26d33f2984236010ef6253fb1887f7
 PlayerStarttime: [28/03/2003:22:50:23 00:00]
 CompanyID: KnKV4M4I/B2FjJ1TToLycw==
 GUID: ----

 C-S:
 DESCRIBE rtsp://76.117.125.33:554/one.mp3 RTSP/1.0
 CSeq: 1
 User-Agent: PVCore/05.02.00.00 PVPlayer/6.18 (Linux; Android; NJ)
 Accept: application/sdp
 Accept-Encoding:

 S-C:
 RTSP/1.0 200 OK
 CSeq: 0
 Date: Mon, Dec 08 2008 01:09:10 GMT
 Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE

 S-C:
 RTSP/1.0 200 OK
 CSeq: 1
 Date: Mon, Dec 08 2008 01:09:10 GMT
 Content-Base: rtsp://192.168.0.101/one.mp3/
 Content-Type: application/sdp
 Content-Length: 377

 v=0
 o=- 520052821747 1 IN IP4 192.168.0.101
 s=MPEG-1 or 2 Audio, streamed by the LIVE555 Media Server
 i=one.mp3
 t=0 0
 a=tool:LIVE555 Streaming Media v2008.02.08
 a=type:broadcast
 a=control:*
 a=range:npt=0-194.374
 a=x-qt-text-nam:MPEG-1 or 2 Audio, streamed by the LIVE555 Media
 Server
 a=x-qt-text-inf:one.mp3
 m=audio 0 RTP/AVP 14
 c=IN IP4 0.0.0.0
 a=control:track1
--~--~-~--~~~---~--~~
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: MediaPlayer setDataSource or prepare issue

2008-12-19 Thread Dave Sparks

setDataSource() with offset is for playing an embedded media file. In
other words, there must be a valid WAVE header at the specified
offset. An example use case is a resource file that contains many WAVE
files with a table of contents at the beginning.

You can call seekTo() to start playback at time offset.

On Dec 19, 8:28 am, Kenneth Loafman kenneth.loaf...@gmail.com wrote:
 This code segment:



 path = /data/noise.wav;
 file = new File(path);

 tx.setText(Prepping audio...);
 Log.i(TAG, Prepping audio);

 for (int i = 0; i  nPlay; ++i) {
 myPlayers[i] = new MediaPlayer();
randFile[i] = new RandomAccessFile(file, r);
 myPlayers[i].setAudioStreamType(AudioManager.STREAM_MUSIC);
myPlayers[i].setDataSource(randFile[i].getFD(),
 i * segSize,
 segSize);
 Log.i(TAG, Prepping:  + i);
myPlayers[i].prepare();
 }

 produces this log:



 12-19 10:05:38.369: INFO/SilentSpeech(3427): Prepping audio
 12-19 10:05:38.409: INFO/SilentSpeech(3427): Prepping: 0
 12-19 10:05:38.449: INFO/SilentSpeech(3427): Prepping: 1
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): error: Prepare failed.: 
 status=0xFFFC
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): java.io.IOException: Prepare 
 failed.: status=0xFFFC
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 android.media.MediaPlayer.prepare(Native Method)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 com.android.silentspeech.SSActivity.playAudio(SSActivity.java:55)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 com.android.silentspeech.SSActivity.onCreate(SSActivity.java:38)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2103)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2156)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 android.app.ActivityThread.access$1800(ActivityThread.java:112)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 android.os.Handler.dispatchMessage(Handler.java:88)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 android.os.Looper.loop(Looper.java:123)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 android.app.ActivityThread.main(ActivityThread.java:3742)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 java.lang.reflect.Method.invokeNative(Native Method)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 java.lang.reflect.Method.invoke(Method.java:515)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
 12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
 dalvik.system.NativeStart.main(Native Method)

 If I replace i * segSize with 0 to always start at the front, it
 works.  Strange.

 Does this mean that:
 1) setDataSource() does not work with offset? -or-
 2) do I need to put a file header at each offset?

 If the answer is 2, is there an option to take raw input?

 ...Thanks,
 ...Ken
--~--~-~--~~~---~--~~
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: MediaPlayer setDataSource or prepare issue

2008-12-19 Thread Dave Sparks

No there is no way to play a segment of a media file.

On Dec 19, 9:52 am, Kenneth Loafman kenneth.loaf...@gmail.com wrote:
 Is there a way to set the length of the segment to play like
 setDataSource() has?  I'm not seeing it.

 ...Thanks,
 ...Ken

 On Fri, 19 Dec 2008 09:03:30 -0800 (PST), Dave Sparks

 davidspa...@android.com wrote:

 setDataSource() with offset is for playing an embedded media file. In
 other words, there must be a valid WAVE header at the specified
 offset. An example use case is a resource file that contains many WAVE
 files with a table of contents at the beginning.

 You can call seekTo() to start playback at time offset.

 On Dec 19, 8:28 am, Kenneth Loafman kenneth.loaf...@gmail.com wrote:
  This code segment:

  path = /data/noise.wav;
  file = new File(path);

  tx.setText(Prepping audio...);
  Log.i(TAG, Prepping audio);

  for (int i = 0; i  nPlay; ++i) {
  myPlayers[i] = new MediaPlayer();
 randFile[i] = new RandomAccessFile(file, r);
  myPlayers[i].setAudioStreamType(AudioManager.STREAM_MUSIC);
 myPlayers[i].setDataSource(randFile[i].getFD(),
  i * segSize,
  segSize);
  Log.i(TAG, Prepping:  + i);
 myPlayers[i].prepare();
  }

  produces this log:

  12-19 10:05:38.369: INFO/SilentSpeech(3427): Prepping audio
  12-19 10:05:38.409: INFO/SilentSpeech(3427): Prepping: 0
  12-19 10:05:38.449: INFO/SilentSpeech(3427): Prepping: 1
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): error: Prepare failed.: 
  status=0xFFFC
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): java.io.IOException: 
  Prepare failed.: status=0xFFFC
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  android.media.MediaPlayer.prepare(Native Method)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  com.android.silentspeech.SSActivity.playAudio(SSActivity.java:55)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  com.android.silentspeech.SSActivity.onCreate(SSActivity.java:38)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2103)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2156)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  android.app.ActivityThread.access$1800(ActivityThread.java:112)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  android.os.Handler.dispatchMessage(Handler.java:88)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  android.os.Looper.loop(Looper.java:123)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  android.app.ActivityThread.main(ActivityThread.java:3742)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  java.lang.reflect.Method.invokeNative(Native Method)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  java.lang.reflect.Method.invoke(Method.java:515)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
  12-19 10:05:38.469: ERROR/SilentSpeech(3427): at 
  dalvik.system.NativeStart.main(Native Method)

  If I replace i * segSize with 0 to always start at the front, it
  works.  Strange.

  Does this mean that:
  1) setDataSource() does not work with offset? -or-
  2) do I need to put a file header at each offset?

  If the answer is 2, is there an option to take raw input?

  ...Thanks,
  ...Ken
--~--~-~--~~~---~--~~
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: Suggestions Needed: can not play sound files under assets folder

2008-12-22 Thread Dave Sparks

See this thread for using media player to play from APK resource
files:

http://groups.google.com/group/android-developers/browse_thread/thread/6668898856f8f090

On Dec 22, 1:20 pm, Toothy Bunny hongkun...@gmail.com wrote:
 Hi All,
 After searching developer group, I found out the problem might be
 related to the file permission, because Android Media player does not
 have permission to access application's data directory.
 Here is another developer's post about Media Player's problem.
 Hongkunwww.omnigsoft.com
--~--~-~--~~~---~--~~
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: Cupcake Anyone in Google that Could Shed Some Light! :) Thanks!

2008-12-23 Thread Dave Sparks

1. The Music Player stops playing when a call comes in and resumes
after the call is complete. With Cupcake, the music player will slowly
ramp up the volume after the call is completed.

2. The streaming audio interface is more flexible than InputStream.
You can build an InputStream interface on it, and we will probably
release some sample code for it. Take a look at the AudioTrack and
AudioRecord classes in the git tree:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=media/java/android/media;h=9d26d4ec9f9d0ff30a4041fc9161fbc34755bcc0;hb=cupcake

On Dec 23, 6:42 am, Jona medicalsou...@hotmail.com wrote:
 //Notable changes introduced in cupcake://
 #  Music
 - New features
   Music playback fades in after suspending for phone call.

 # Framework
 - Streaming audio I/O for applications.

 Questions:

 1). Fade Music playback, will we have to lessen to an onCall event?
 and handle the fades or will this be something that automatically
 fades the music pauses? and after the call resumes playback?

 2). Streaming audio, will we be passing an InputStream? that would be
 great!

 Thanks in advance!
 Moto
--~--~-~--~~~---~--~~
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: MediaPlayer streaming WAV audio

2008-12-23 Thread Dave Sparks

The MediaPlayer doesn't support streaming at all. You can get away
with a pseudo-streamed MP3 because the MP3 format was intended to be
broadcast and the MP3 parser is a bit more forgiving about it than the
other parsers.

On Dec 23, 4:21 am, Aldo Neto tumo...@gmail.com wrote:
 Hi,
   I developed a quite simple code for audio streaming with MediaPlayer
 (please see code below). I tested it with an MP3 file and it worked
 perfectly. However, when I tested the same code with a WAV audio, the
 MediaPlayer was unable to stream the audio properly.

I had to build a StreamPlayer based 
 onhttp://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-stream...

I don't know if this a known issue that I'm not aware, but does anybody
 knows why the code below wouldn't work with WAV files? Does MediaPlayer
 library supports WAV streaming?

 Thanks

   final ProgressBar progressBar = (ProgressBar)
 findViewById(R.id.progress_bar);
   player = new MediaPlayer();
   player.setDataSource(path);
   player.setAudioStreamType(AudioManager.STREAM_MUSIC);
   player.prepareAsync();
   player.setOnPreparedListener(new OnPreparedListener(){

 @Override
 public void onPrepared(MediaPlayer mp)
 {
   //Preparation finished. Start playing voicemail
   player.start();

   //Update primary progress on Progress bar
   startPlayProgressUpdater();
 }
   });

   player.setOnBufferingUpdateListener(new OnBufferingUpdateListener()
   {

 @Override
 public void onBufferingUpdate(MediaPlayer mp, int percent)
 {
   //Update secondary progress on Progress bar
   progressBar.setSecondaryProgress(percent);
 }
   });
--~--~-~--~~~---~--~~
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: MediaPlayer streaming WAV audio

2008-12-23 Thread Dave Sparks

The Cupcake branch has provisions for streaming linear PCM audio in
and out of Java.

But before everyone gets too excited, please remember that it takes
time for code in a stabilization branch to be deployed on a device.
There are a series of release candidates, terminal acceptance cycles
on handset(s), and then manufacturing and/or OTA cycles. It may be
months before you see this feature on an actual device.

On Dec 23, 10:44 am, Aldo Neto tumo...@gmail.com wrote:
 Thanks!
 I believe that Android team will add support for streaming sometime in the
 future, is that right?

 On Tue, Dec 23, 2008 at 4:37 PM, Dave Sparks davidspa...@android.comwrote:



  The MediaPlayer doesn't support streaming at all. You can get away
  with a pseudo-streamed MP3 because the MP3 format was intended to be
  broadcast and the MP3 parser is a bit more forgiving about it than the
  other parsers.

  On Dec 23, 4:21 am, Aldo Neto tumo...@gmail.com wrote:
   Hi,
 I developed a quite simple code for audio streaming with MediaPlayer
   (please see code below). I tested it with an MP3 file and it worked
   perfectly. However, when I tested the same code with a WAV audio, the
   MediaPlayer was unable to stream the audio properly.

  I had to build a StreamPlayer based onhttp://
  blog.pocketjourney.com/2008/04/04/tutorial-custom-media-stream...

  I don't know if this a known issue that I'm not aware, but does
  anybody
   knows why the code below wouldn't work with WAV files? Does MediaPlayer
   library supports WAV streaming?

   Thanks

 final ProgressBar progressBar = (ProgressBar)
   findViewById(R.id.progress_bar);
 player = new MediaPlayer();
 player.setDataSource(path);
 player.setAudioStreamType(AudioManager.STREAM_MUSIC);
 player.prepareAsync();
 player.setOnPreparedListener(new OnPreparedListener(){

   @Override
   public void onPrepared(MediaPlayer mp)
   {
 //Preparation finished. Start playing voicemail
 player.start();

 //Update primary progress on Progress bar
 startPlayProgressUpdater();
   }
 });

 player.setOnBufferingUpdateListener(new OnBufferingUpdateListener()
 {

   @Override
   public void onBufferingUpdate(MediaPlayer mp, int percent)
   {
 //Update secondary progress on Progress bar
 progressBar.setSecondaryProgress(percent);
   }
 });
--~--~-~--~~~---~--~~
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: Cupcake Anyone in Google that Could Shed Some Light! :) Thanks!

2008-12-24 Thread Dave Sparks

I assume you mean an EQ insert in the final audio output. If so, the
answer is no, this is not part of the Cupcake release.

Cupcake provides support for streaming microphone input to a Java app
and streaming audio from a Java app into the audio mixer.

On Dec 24, 3:25 am, Aasha wilda...@gmail.com wrote:
 Would these changes be having Equalizer support for Audio - out?

 On Dec 24, 12:28 am, Jona medicalsou...@hotmail.com wrote:

  Thanks Dave!
--~--~-~--~~~---~--~~
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: how to evoke pv logger

2008-12-24 Thread Dave Sparks

It works for me - I have been using it extensively in the last few
weeks.

On Dec 23, 10:33 pm, develop code developcod...@gmail.com wrote:
 Hi,

 i tried the above modifications, i am not getting the logs from libraries
 (pv player). PV logger enabling method has changed? Any other methods to
 enable. I am trying it on the emulator.

 On Fri, Nov 7, 2008 at 8:21 AM, Dave davidlspa...@gmail.com wrote:

  To turn on PV logging, change extlibs/pv/oscl/pvlogger/src/pvlogger.h:

  /* Release mode-- No logging */
  #define PVLOGGER_INST_LEVEL 0  Change this value to 5

  and extlibs/pv/android/thread_init.cpp:

  #if 0    - Change this value to 1
     PVLoggerAppender *appender = new
  AndroidLogAppenderTimeAndIdLayout,1024();
  ...
  ...
  #endif

  I haven't tried this in awhile, not sure if it still works.

  On Nov 5, 12:07 am, already menghongl...@gmail.com wrote:
   hello, I want to see the pv logs while debug.
   I see in pv part, the logger is always printed as:
   PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
   (0,PVAuthorEngine::SetLogAppender));
   but can not find how to enable pv log, and where it is printed,
   Is there any body knowing about 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] Re: Capture and Playback

2008-12-29 Thread Dave Sparks

There is no support for javax.sound in Android and there are no plans
to support it. We will have support for streaming audio in a future
release.

On Dec 29, 1:11 am, Lei poohd...@gmail.com wrote:
 I'm stuck on this.
 Help me please.

 On Dec 26, 2:23 pm, Lei poohd...@gmail.com wrote:

  Hi, all
  I want to capture the audio from the microphone, save the audio in the
  buffer, and then playback the audio in the buffer.
  It seems that it will be simple if I can use javax.sound.* to create a
  sourceDataLine and a targetDataLine.
  But I cannot import javax.sound.* into my project.
  How to solve the problem?

  Thanks in advance.

  Regards,
  Lei
--~--~-~--~~~---~--~~
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: FireWall Packets in Jitter Buffer

2008-12-29 Thread Dave Sparks

This forum is for application development. Try asking your questions
in android-framework.

On Dec 25, 3:28 am, m.developer.software
m.developer.softw...@gmail.com wrote:
 Hi,

 What does DecodeFireWallPackets( ) do in pvmf_jitter_buffer_node.cpp
 and why is this requried? What is the concept behind using this?

 Please answer for my above question.
--~--~-~--~~~---~--~~
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: Recording audio stream

2008-12-30 Thread Dave Sparks

It's probably not really streaming audio. Some people are working
around the issue by tailing the file as it is being written.

On Dec 30, 5:03 am, FranckLefevre flas...@gmail.com wrote:
 The application Phone Recorder available in Market softwares already
 does this pretty well.
 I don't know if sources are available somewhere...

 Franck.

 On Dec 25, 1:27 am, vitalii.mi...@gmail.com

 vitalii.mi...@gmail.com wrote:
Is there any way to record audio stream and send streaming audio  to
  network ??  Instead of recording to file.
--~--~-~--~~~---~--~~
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: About speech recognizer

2008-12-30 Thread Dave Sparks

There is no support for speech recognition in the current SDK.

On Dec 29, 10:26 pm, michael michael.liu...@gmail.com wrote:
 hi all
Does this ability is already provided now?
--~--~-~--~~~---~--~~
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: About speech recognizer

2008-12-30 Thread Dave Sparks

The voice dialer has its own speech recognition engine - it just
hasn't been exposed in a Java API yet.

On Dec 30, 3:32 pm, Eng, Cary cary@hp.com wrote:
 No wonder the Voice Dialer never works for me :-/

 -Original Message-
 From: android-developers@googlegroups.com 
 [mailto:android-develop...@googlegroups.com] On Behalf Of Dave Sparks
 Sent: Tuesday, December 30, 2008 5:32 PM
 To: Android Developers
 Subject: [android-developers] Re: About speech recognizer

 There is no support for speech recognition in the current SDK.

 On Dec 29, 10:26 pm, michael michael.liu...@gmail.com wrote:
  hi all
 Does this ability is already provided now?
--~--~-~--~~~---~--~~
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: To Play .mp3 from host machine filesystem

2008-12-31 Thread Dave Sparks

You are running a virtual Linux system on your workstation. It only
has access to the file systems that are mounted, which include the
fixed images required to boot and run the device and and an optional
virtual SD card image.

If you are really ambitious, you could modify the emulator code and
system code to allow mounting your workstation file system.

On Dec 31, 1:01 am, sal suhailb...@gmail.com wrote:
 Hi All,

 Is there any procedure to play .mp3 file stored in a filesystem of
 host machine (windows XP) without getting into file system of
 emulator.

 I know its least useful scenario but i am just curious to know
 whaether MediaPlayer class supports it or not ?

 Thanks
 Sal
--~--~-~--~~~---~--~~
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: When will the Media classes be able to connect to telephone 'conversation' audio channels ?

2009-01-02 Thread Dave Sparks

There are no plans for exposing in-call audio to the apps processor.
In-call audio is controlled by the radio and typically not accessible
to the apps processor.

On Dec 26 2008, 10:00 pm, StevenS shearer_ste...@hotmail.com wrote:
 If I'm reading the API documentation correctly, neither the
 MediaRecorder.AudioSource nor the  MediaPlayer.AudioSource can connect
 to the telephone conversation audio channels - eg. the TELEPHONE
 CONVERSATION microphone  speaker 'lines'.

 Both of these would be required to support advanced call handling
 applications ON THE DEVICE.

 Are there any plans to support this type of functionality ?

 When might it be available ?

 Thanks,
 Steven.
--~--~-~--~~~---~--~~
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: imeem and buffering audio with MediaPlayer

2009-01-02 Thread Dave Sparks

I haven't looked at imeem, but one way to get around the issue is
using an HTTP proxy on the device. The proxy server could be buffering
up the next stream while the current stream is playing.

On Dec 30 2008, 11:37 pm, Dan McGuirk mcgu...@gmail.com wrote:
 Hi,

 I'm wondering if anyone knows how the imeem application is handling
 its streaming audio.  It seems to be able to buffer the entire track
 as quickly as possible, as well as buffering the upcoming track before
 it is played.

 As far as I can tell from reading several other threads here, that is
 only possible by writing the track to a file and then pointing the
 media player at the file.  But I'm watching df pretty closely and I
 don't see the space used on any of the partitions going up as it
 buffers.  Is the data hiding somewhere?

 Another possibility that was raised was that you could do this using a
 file descriptor associated with a socket, sort of like in this
 example:

 http://groups.google.com/group/android-developers/browse_thread/threa...

 But apparently this doesn't work--I'm guessing maybe because the
 MediaPlayer tries to seek on the fd to determine its length?
 (Guessing based on its behavior with normal files that are appended to
 after it starts playing.)

 Is there some other possibility?  Obviously the imeem folks have it
 working well somehow, but I don't quite get how.  Some of the other
 threads I've read seem to be telling me this isn't quite possible
 (links below).

 If I just pass URLs to MediaPlayer one after the other in the normal
 way, there's way too long of a delay (10+ seconds) between tracks.
 That's too long; long enough for the user to start thinking, Why
 isn't this working?, pick up the phone and double-check it, etc.  So
 I need some way to start buffering an upcoming track in advance (maybe
 create a second MediaPlayer and call prepareAsync() early...  although
 this seems messy, and it can't be what imeem is doing).

 Thanks for any help.

 Related threads:

 http://groups.google.com/group/android-developers/browse_thread/threa...http://groups.google.com/group/android-developers/browse_thread/threa...http://groups.google.com/group/android-developers/browse_thread/threa...
--~--~-~--~~~---~--~~
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: imeem and buffering audio with MediaPlayer

2009-01-03 Thread Dave Sparks

I haven't tried it myself and don't have any sample code. The proxy
approach has one advantage over simple file playback: It can start
playing as soon as there is a reasonable amount of content downloaded
- assuming the content is formatted properly for streaming. For local
file playback, I believe that OpenCore seeks to the end immediately to
find the end of the file and that won't work with a partial download.

On Jan 3, 12:37 am, blindfold seeingwithso...@gmail.com wrote:
 How does the HTTP proxy approach perform as compared to saving to
 flash and then playing from there? Is there any sample code for trying
 this proxy server workaround for playing audio?

 Thanks

 On Jan 2, 6:32 pm, Dave Sparks davidspa...@android.com wrote:

  I haven't looked at imeem, but one way to get around the issue is
  using an HTTP proxy on the device. The proxy server could be buffering
  up the next stream while the current stream is playing.
--~--~-~--~~~---~--~~
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: When will the Media classes be able to connect to telephone 'conversation' audio channels ?

2009-01-03 Thread Dave Sparks

It may be a compelling feature, but it's outside the control of the
apps processor. It is up to the hardware manufacturer to implement
this, not Android.

My understanding is that there are strict latency requirements on GSM
audio that makes it difficult to loop call audio through the apps
processor.

On Jan 2, 4:06 pm, mashpl...@gmail.com mashpl...@gmail.com wrote:
 This is a mistake.  There are many reasons why exposing in-call audio
 to the apps process is a good idea.  Please reconsider your position
 on this.

 Kind Regards,

 Vince

 On Jan 3, 1:27 am, Dave Sparks davidspa...@android.com wrote:

  There are no plans for exposing in-call audio to the apps processor.
  In-call audio is controlled by the radio and typically not accessible
  to the apps processor.

  On Dec 26 2008, 10:00 pm, StevenS shearer_ste...@hotmail.com wrote:

   If I'm reading the API documentation correctly, neither the
   MediaRecorder.AudioSource nor the  MediaPlayer.AudioSource can connect
   to the telephone conversation audio channels - eg. the TELEPHONE
   CONVERSATION microphone  speaker 'lines'.

   Both of these would be required to support advanced call handling
   applications ON THE DEVICE.

   Are there any plans to support this type of functionality ?

   When might it be available ?

   Thanks,
   Steven.
--~--~-~--~~~---~--~~
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: imeem and buffering audio with MediaPlayer

2009-01-06 Thread Dave Sparks

I don't think there will be significant changes to the MediaPlayer API
deployed on devices in the next few months.

On Jan 4, 7:08 pm, Dan McGuirk mcgu...@gmail.com wrote:
 Thanks for the reply and the suggestion.

 I do wonder, though, how long this will remain the suggested
 solution.  Are there plans to update the API to allow more
 flexibility?  I wouldn't really want to put a lot of effort into
 developing and maintaining this kind of scheme just to throw it away
 in a few months if the API is improved.

 On Jan 2, 10:32 am, Dave Sparks davidspa...@android.com wrote:

  I haven't looked at imeem, but one way to get around the issue is
  using an HTTP proxy on the device. The proxy server could be buffering
  up the next stream while the current stream is playing.
--~--~-~--~~~---~--~~
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: When will the Media classes be able to connect to telephone 'conversation' audio channels ?

2009-01-06 Thread Dave Sparks

android-discuss is probably a better forum for this discussion.

I would like to correct a misconception: Android is an application
processor stack. It does not include a radio stack, nor is it likely
to include one in the near future. The radio firmware is typically
proprietary to the chip vendor and closely tied to the hardware
architecture of the chip.

On Jan 4, 5:30 pm, StevenS shearer_ste...@hotmail.com wrote:
 Thanks for the replies David !

 I totally understand that the hardware manufacturer needs to implement
 the appropriate links - like a couple of extra traces of copper - what
 I don't understand is WHY they wouldn't !  Or WHY it wouldn't be seen
 as a basic requirement for the product.

 I also question WHY there's concern about a lack of CPU power - I've
 been doing IVR development since early 1997, where an Intel 386 CPU
 was supporting multiple simulatenous phone calls.  Well, actually, in
 hindsight, the CPU was supported by a telephony board ...  so maybe
 this concern is valid ...

 In any event, what happened to the statement that ALL software on the
 Android platform could be replaced - including the phone
 (interface) ?  It's my interpretation that if the phone app can handle
 incoming  outgoing calls, then it should be possible to extend it to
 include IVR-like features.

 Is there a more-appropriate forum to discuss this 'issue' /
 requirement / feature request ?

 Thanks,
 Steven.

 On Jan 3, 8:36 am, Dave Sparks davidspa...@android.com wrote:

  It may be a compelling feature, but it's outside the control of the
  apps processor. It is up to the hardware manufacturer to implement
  this, not Android.

  My understanding is that there are strict latency requirements on GSM
  audio that makes it difficult to loop call audio through the apps
  processor.

  On Jan 2, 4:06 pm, mashpl...@gmail.com mashpl...@gmail.com wrote:

   This is a mistake.  There are many reasons why exposing in-call audio
   to the apps process is a good idea.  Please reconsider your position
   on this.

   Kind Regards,

   Vince

   On Jan 3, 1:27 am, Dave Sparks davidspa...@android.com wrote:

There are no plans for exposing in-call audio to the apps processor.
In-call audio is controlled by the radio and typically not accessible
to the apps processor.

On Dec 26 2008, 10:00 pm,StevenSshearer_ste...@hotmail.com wrote:

 If I'm reading the API documentation correctly, neither the
 MediaRecorder.AudioSource nor the  MediaPlayer.AudioSource can connect
 to the telephone conversation audio channels - eg. the TELEPHONE
 CONVERSATION microphone  speaker 'lines'.

 Both of these would be required to support advanced call handling
 applications ON THE DEVICE.

 Are there any plans to support this type of functionality ?

 When might it be available ?

 Thanks,
 Steven.- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
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: missing javax audio?

2009-01-07 Thread Dave Sparks

There is no plan to support javax.sound. I guess I need to writeup a
media FAQ because this question gets asked repeatedly.

Cupcake has support for streaming PCM audio in and out of Java. It
also supports static buffers, i.e. load a buffer with sound data and
trigger (one-shot) or loop. Both static and streamed buffers have
support for pitch and volume controls.

On Jan 7, 1:19 pm, Pv p...@swooby.com wrote:
 Any update on anyone getting javax.sound.sampled (or something
 similar) working?

 Pv

 On Nov 23 2008, 12:49 am, MichaelEGR foun...@egrsoftware.com wrote:

  Greets...  Wow.. good thread and discussion thus far. Best and most
  recent audio thread I've seen.

  I am an audio/graphics professional and my first project, for kicks,
  is to port my desktop Java Quake3 class game engine to Android and
  OpenGL ES as a test of well my ability to get Q3 tech playing with ES
  and Android and it didn't take long to realize the state of audio in
  SDK 1.0_r1 is not suitable for lots of audio stuff I'd like to
  accomplish in general and some novel features for my port (IE voice
  chat with desktop clients from built in mic on G1, etc; fun!). We'll
  see how the Q3 port turns out; gonna hack a file based push to talk
  feature most likely via MediaRecorder; delayed audio w/ this though
  and only one way to desktop clients to show proof of concept.

  I specifically did not adopt or even look at Android until a handset
  device was released and the SDK hit 1.0 simply because I knew the
  platform probably would not be complete and I don't have the time /
  desire to work around incomplete APIs / implementation (yes, was
  correct on that; for audio at least; lots of gold to be had elsewhere;
  seriously, kudos Android team et al, I haven't been this excited in a
  while about a new tech!). So, yes, lets continue to discuss how to
  solve the audio issue that encroaches on all of us who want
  performance audio on Android and all 'droid devices in general. I will
  throw in my two cents on how I _am_ (not would be) solving it after
  dealing with the woes and inadequacies of Java Sound on the desktop
  _for years_ from an API perspective to simply incomplete
  implementations on various platforms and JVM versions. (Java Sound -
  Write once, test everywhe... oh wait you mean it doesn't fully work on
  X platform at all?.?. gah!!!)

  One solution on the desktop has been to ditch Java Sound and support
  PortAudio (www.portaudio.com) via JNI. I propose that Android can also
  provide the best and most _portable_ audio solution not only on the G1
  and other devices, but _future_ hardware that supports Android by
  adopting PortAudio and exposing a lean and mean API to developers that
  then can be further extended with higher level APIs for purpose built
  processes (speech detection / Jspeex port / DSP processing, even a
  javax.sound implementation built _on top_ of PortAudio, etc). What is
  needed is simple and efficient raw audio I/O functionality at the
  core; PortAudio provides this and only this! For file I/O it's not a
  bad idea to support Libsndfile (http://www.mega-nerd.com/libsndfile/).
  Between PortAudio  Libsndfile raw hardware and file based audio I/O
  can be solved by time tested open source solutions.

  Now... I mentioned future hardware supporting Android... I just so
  happen to be developing an embedded audio hardware product that
  focuses on advanced spatial processing (think large scale 2D and 3D
  sound arrays; I have a 32 speaker hemisphere setup at my facility in
  SF for instance; check here for those interested in an overview I
  published for the recent AES conference in SF w/ picts  equipment
  specifications --http://research.egrsoftware.com/conferences/2008/aes2008/)
  and after finally dipping into Android (IE G1  SDK 1.0 finally
  available and in my hands) I've decided unanimously and almost
  instantly to ditch my previous path which was Analog Devices Blackfin/
  Sharc based processors running uClinux and am switching to the TI
  OMAP3 3550 and Android as the processor/stack. In doing this I already
  am adopting PortAudio on my future Android based hardware and this is
  how I presently plan to expose audio I/O to Android developers on my
  hardware. So in time this is _going_ to be done already.

  Seeing as there isn't a published / unified vision on where to take
  audio I/O for Android as is I do strongly propose supporting PortAudio
  out of it's shear elegance and wide activity and support in the audio
  community at large across numerous OSes / desktop to mobile. Not only
  will it provide a mean and lean audio API at the core, but it will be
  portable at its core between different hardware configurations on hand
  sets to say custom built audio hardware like my own efforts which will
  support high channel count analog, ADAT, audio over HDMI, and even
  MADI I/O in time. There is absolutely no reason to support Java Sound
  as the core implementation just 

[android-developers] Re: How do you create an MMS message with audio attachment?

2009-01-07 Thread Dave Sparks

I believe this was deliberately left out of the code for 1.0. I'm not
aware of any plans to add it in Cupcake. I suggest you file a feature
request.

On Jan 7, 7:09 am, Blake B. bbuckle...@yahoo.com wrote:
 I'll ping the group one last time.  Can anyone confirm that this is
 not possible?

 I looked at the latest com.android.mms.ui.ComposeMessageActivity in
 the main code branch now (I believe this includes the Cupcake
 updates), and it still appears the handleSendIntent() intent method is
 assuming that any EXTRA_STREAM data is an image, without checking the
 data MIME type.

 Any other ideas to maybe directly create an MMS message to send?  It's
 hard for me to believe this is completely not possible to do in code.

 Thanks again,
 Blake

 On Jan 5, 8:50 am, Blake B. bbuckle...@yahoo.com wrote:

  Ok, digging into the com.android.mms.ui.ComposeMessageActivity
  handleSendIntent() method, it appears as though only Image
  attachments are expected in Intent Extras?  Does anyone have any
  creative work-arounds of how to create/send an MMS message with an
  audio attachment?

  private void handleSendIntent(Intent intent) {
  Bundle extras = intent.getExtras();

  if (Intent.ACTION_SEND.equals(intent.getAction())  (extras !
  = null)  extras.containsKey(Intent.EXTRA_STREAM)) {
  Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM);
  if (uri != null) {
  convertMessage(true);
  addImage(uri);   IMAGE IS
  BEING ASSUMED
  }
  }
  }

  Will audio attachments via Intents be supported in the cupcake
  release?  (I haven't downloaded it yet myself)

  Thanks,
  Blake

  On Dec 30 2008, 8:52 pm, Blake B. bbuckle...@yahoo.com wrote:

   Hello all,

   I am trying to create an MMS message with an audio attachment and a
   message for the user to view and then click send themselves.  If you
   create a new Message on your own, you are able to attach an audio file
   (.amr in this case), but how do you do this programatically?

   When I do this code below, I get the MMS Compose Message window, but
   it gives an error message: Unsupported picture format.  Please select
   a different picture.:

   final Intent i = new Intent(Intent.ACTION_SEND);
   i.putExtra(sms_body, msgText);
   i.putExtra(Intent.EXTRA_STREAM, audioUri);
   i.setType(*/*);
   startActivity(i);

   When I run this code below (changed MIME type from */* to audio/*
   or audio/amr, Android instead brings up the GMail client with the
   audio attachment on the email:

   final Intent i = new Intent(Intent.ACTION_SEND);
   i.putExtra(sms_body, msgText);
   i.putExtra(Intent.EXTRA_STREAM, audioUri);
   i.setType(audio/*);
   startActivity(i);

   How can I direct the system to create an MMS message with a .amr
   attachment?

   Thanks,
   Blake
--~--~-~--~~~---~--~~
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: Got exception while playing a media file

2009-01-07 Thread Dave Sparks

I'll be the first to admit that our error reporting is bad right now.

Most likely is that it's unsupported file format or the file itself is
corrupt.

On Jan 7, 2:59 am, manoj manojkumar.m...@gmail.com wrote:
 Hello friends,

 I am trying to play some media files which are located in SDCard.

 While playing I got the below mentioned exception and nothing is being
 played.

 java.io.IOException: Prepare failed.: status=0x

 I dont know why I am getting this exception.

 1. How to resolve this exception.

 2. In which situations we get this type of exceptions?

 Can any please help me.

 Thanks,
 Manoj.
--~--~-~--~~~---~--~~
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: imeem and buffering audio with MediaPlayer

2009-01-07 Thread Dave Sparks

That refers to the AudioTrack and AudioRecord interfaces which allow
for things like recording from the microphone and generating raw audio
in the application to be streamed to the audio output. It does not
include a byte stream interface to the MediaPlayer, for example.

I don't see that those changes address Dan McGuirk's needs unless he's
planning on doing MP3 decode in Java.

Cupcake is pretty much feature complete and we're working on
stabilization now. I'm hoping to do some major updates to the media
framework in the release after Cupcake.

On Jan 7, 6:17 am, blindfold seeingwithso...@gmail.com wrote:
 The Cupcake roadmap reads about new features at

 http://source.android.com/roadmap/cupcake

 Access to the raw audio data for playback and recording from
 application code and Streaming audio I/O for applications. The
 associated MediaPlayer API changes well may be minimal, but the
 resulting functionality mentioned here appears quite significant for
 many of us - although I cannot judge if it also addresses Dan
 McGuirk's needs. Or am I confused about what is coming up in the short
 term?

 Regards

 On Jan 6, 11:49 pm, Dave Sparks davidspa...@android.com wrote:

  I don't think there will be significant changes to the MediaPlayer API
  deployed on devices in the next few months.
--~--~-~--~~~---~--~~
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: Resizing camera preview dimensions

2009-01-07 Thread Dave Sparks

The G1 camera driver currently ignores the preview size and forces it
to 320 x 240.

On Jan 6, 11:19 am, Omar omarta...@gmail.com wrote:
 You can do:

 Camera.Parameters p = c.getParameters();
 p.setPreviewSize(width, height);
 c.setParameters(p);

 before you do c.startPreview();
 where c is Camera.

 On Jan 6, 5:07 pm, Robert rret...@gmail.com wrote:

  Is anyone aware of how to lower the width and height size that is
  returned by previewCallback for Camera? Right now it returns an image
  with dimensions 480x320 and I would like to reduce that by at least
  half. Any suggestions?

  Robert
--~--~-~--~~~---~--~~
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: How play audio raw-data on speakerphone?

2009-01-07 Thread Dave Sparks

There is no API for this.

On Jan 6, 7:30 am, Skywalker rumatah...@gmail.com wrote:
 I need to play incoming audio data (raw) on phone speaker (not through
 back dynamic).
 I have not found any API for this. :(
 Help, please...
--~--~-~--~~~---~--~~
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: Need to display Video from encoded Video frame data

2009-01-07 Thread Dave Sparks

You can convert the raw YUV to RGB and draw it on the surface
yourself. There is no API to send encoded frames directly to an
decoder and have them displayed and there are no plans to support
this.

On Jan 6, 4:34 am, iblues iblues@gmail.com wrote:
 Hi all,

 In my application development, there is a requirement where the
 encoded video frame data will be delivered to the library layer on the
 fly over 3G. Is there a possibility of displaying the frame data
 directly to a SurfaceView? I see that the existing media player can
 only take a source from a 3GP or MP4 or http/RTP sources and cannot
 play raw YUV frame data or individual encoded frames.

 If not, how can I implement an equivalent video player to meet this
 requirement?

 This implementation would be similar to the camera preview except that
 instead of live data from camera, my data will be transmitted via
 network.

 Thanks  Regards,
 iblues
--~--~-~--~~~---~--~~
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: JNI

2009-01-07 Thread Dave Sparks

You can download the Android source code from source.android.com and
build your JNI libraries against the gcc toolchain for testing.

On Jan 5, 5:19 pm, blues bluescapt...@gmail.com wrote:
 I have read all the post about JNI. And I know JNI is not offcially
 supported and google is working on the native SDK and I have to wait.

 But I really want to verify the performance of the native code now so
 I can know which direction to go before the native SDK release.

 So may I know if the G1 or DEV 1 phone support JNI? Just for test
 purpose on my own phone.

 Blues
--~--~-~--~~~---~--~~
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: Has anyone loaded video into a application?

2009-01-08 Thread Dave Sparks

There is a video player widget called VideoView for full screen video
with optional transport controls. Alternatively you can write your own
code around the MediaPlayer object.

On Jan 7, 2:14 pm, Delmarc intact...@gmail.com wrote:
 I am working on a game where cut-scenes happen... but I have yet to
 read anything deep on video formats and such... I am guessing that I
 can go with H.264... but has anyone worked with it deeper??? also I
 doubt you can do anything deeper then just play the video but does
 anyone know this??? I have looked around and haven't seen anything
 that is remotely there...

 This is why i just may develop it on flash and hope it will soon go to
 Android... what I am thinking of is yet to be done on iphone or the
 android platform...
--~--~-~--~~~---~--~~
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: Android media api's relation to PVMF api's

2009-01-08 Thread Dave Sparks

MediaPlayer is a high level abstraction for OpenCore. There are no
immediate plans to expose any of OpenCore's lower level API's to Java.

On Jan 8, 1:43 am, vishy s vishy.s1...@gmail.com wrote:
 Hi folks,
 I am trying find the relation between android media api's available 
 (http://code.google.com/android/reference/android/media/MediaPlayer.html)
 for android applications and the PVMF api's which are available as a
 part of openCORE. Some of the API's are differing. How are these
 linked internally?

 Is there an interface class or headerfile that we can see?

 I ran around the net but failed failed to find one such doc that
 explains this

 Thanks in advance !!!
 -Vishwa
--~--~-~--~~~---~--~~
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: imeem and buffering audio with MediaPlayer

2009-01-08 Thread Dave Sparks

Yes, AudioTrack and MediaPlayer will play along very nicely.

MediaPlayer uses AudioTrack for its low-level audio interface. Up to
32 tracks of audio can be mixed.

On Jan 8, 5:49 am, blindfold seeingwithso...@gmail.com wrote:
 Thanks David. You say that Cupcake's AudioTrack allows for

  generating raw audio in the application to be streamed to the audio output.
  It does not include a byte stream interface to the MediaPlayer, for example.

 Does this mean that it bypasses MediaPlayer altogether in accessing
 the audio hardware? If so, I hope it does not also bypass the low-
 level audio mixer, because apart from my own on-the-fly synthesized
 audio, I simultaneously output (asynchronously, depending on events)
 my own sampled human speech as well as speech from the Android TTS
 engine. It would be horrible if AudioTrack blocked the audio output
 from simultaneous access by Mediaplayer.

 I had been expecting a new API method like MediaPlayer.create(Context
 context, byte[] audioData) as a minor extension to
 android.media.MediaPlayer, but now I am again confused about what to
 expect, and actually worried about the interaction between AudioTrack
 and MediaPlayer.

 Indeed there is no word about (low-level) audio mixing or MediaPlayer
 in

 http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_...

 So, will AudioTrack and MediaPlayer play along nicely?

 Thanks

 On Jan 8, 4:07 am, Dave Sparks davidspa...@android.com wrote:

  That refers to the AudioTrack and AudioRecord interfaces which allow
  for things like recording from the microphone and generating raw audio
  in the application to be streamed to the audio output. It does not
  include a byte stream interface to the MediaPlayer, for example.

  I don't see that those changes address Dan McGuirk's needs unless he's
  planning on doing MP3 decode in Java.

  Cupcake is pretty much feature complete and we're working on
  stabilization now. I'm hoping to do some major updates to the media
  framework in the release after Cupcake.
--~--~-~--~~~---~--~~
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: Inject key event for call camera app

2009-01-09 Thread Dave Sparks

You want to broadcast android.media.action.IMAGE_CAPTURE intent.

On Jan 9, 9:55 am, fala70 fal...@gmail.com wrote:
 Hi guys,

 Somebody know how can I call the camera capture application from my
 application ? I tried to use inject key event without success using
 KEY CAMERA BUTTON. If  the user push key camera button from any
 applications, the camera capture application work. Is there a mode to
 call camera capture application from my activiy ?

 Thanks at all
 Stefano
--~--~-~--~~~---~--~~
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: use camera in portrait mode

2009-01-09 Thread Dave Sparks

There is an interaction between the screen orientation and the camera
that causes problems for portrait mode. There will be a platform fix
in a future release, however it's possible that some devices will not
be able to support portrait mode.

On Jan 9, 5:37 am, jarkman jark...@gmail.com wrote:
 For what little help it is, I tried  failed to do this, and logged it
 as a bug:http://code.google.com/p/android/issues/detail?id=1193

 Richard

 On Jan 9, 11:20 am, Christian Wiesbauer christian.wiesba...@bdc.at
 wrote:

  Hi,

  is it possible to use the camera of the G1 in portrait mode? Maybe there is
  a trick like rotate the SurfaceView degrees?

  Thanks,
  Christian Wiesbauer
--~--~-~--~~~---~--~~
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: Android media api's relation to PVMF api's

2009-01-09 Thread Dave Sparks

Ah... then you should be asking over in android-framework. This forum
is for application developers. As freepine mentioned, there are some
docs to get you started in the source tree.

On Jan 9, 5:13 am, vishy s vishy.s1...@gmail.com wrote:
 Dave, Thank you very much for the information.

 I also would like to know how to integrate components like OpenMAX
 compliant codecs, parsers, protocols.. Is there any document or link
 that can guide me?

 Thanks and regards,
 -Vishwa

 On Jan 9, 8:56 am, Dave Sparks davidspa...@android.com wrote:

  MediaPlayer is a high level abstraction for OpenCore. There are no
  immediate plans to expose any of OpenCore's lower level API's to Java.

  On Jan 8, 1:43 am, vishy s vishy.s1...@gmail.com wrote:

   Hi folks,
   I am trying find the relation between android media api's available 
   (http://code.google.com/android/reference/android/media/MediaPlayer.html)
   for android applications and the PVMF api's which are available as a
   part of openCORE. Some of the API's are differing. How are these
   linked internally?

   Is there an interface class or headerfile that we can see?

   I ran around the net but failed failed to find one such doc that
   explains this

   Thanks in advance !!!
   -Vishwa- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
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: FM Radio

2009-01-09 Thread Dave Sparks

There is no platform support for this yet. You should take this up in
android-platform.

On Jan 8, 11:58 am, jas_h jasleen_pah...@yahoo.com wrote:
 Hi,

 Is there a FM receiver or transmitter application available on the
 Android platform?
 What is preferred - HCI or I2C?
 What about RDS?

 Thanks.
--~--~-~--~~~---~--~~
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: Playing Video via MediaPlayer with Emulator

2009-01-09 Thread Dave Sparks

You left out a key detail - what is the frame size?

The specs you quoted are for a G1 device - the emulator is probably
not quite that good. In addition to running soft codecs in ARM
emulation, it's also doing color space conversion, scaling, and
rotation in ARM emulation.

On Jan 9, 4:22 pm, Brad A hashbro...@gmail.com wrote:
 I'm trying to get video functions working on the Android emulator,
 using the MediaPlayer demo apis app.
 I'm having a hard time getting a file that is properly encoded.  I
 could use some help understanding the specs and how to meet them.

 From what I understand, the emulator cannot handle streaming video,
 but you can play video locally from an emulated SD Card.  Preferred
 format is H.264 Baseline, which is the same as MPEG-4 AVC.  The
 Baseline profile seems to be the key, and what is probably giving me
 problems.  All I really know is that b frames are not supported in
 that profile.  From other information I've seen, looks like you want
 something with 30 fps and max 600 kbps bitrate.
 Does that sound correct?

 I've created the emulated SD Card and pushed my video to it.  I've
 tested other 3gp videos, that at least played (poorly), so I know I
 have that part right.  But with my mp4 video, I either get an error
 with getVideoSize returned -1, or prepare failed.

 The file I'm trying to play was originally sourced from a flash video
 off the web, with ext .f4v.  I'm using a program called ImToo FLV
 Converter (any better suggestions?), and setting the target profile as
 MPEG-4 AVC.  I've specified 30fps and a Level of 12, which seems to
 correspond to Level 1.2 referenced herehttp://en.wikipedia.org/wiki/H.264.
 It has an expert panel where it allows me to enter a b_frames
 value.  I put False, although I don't know if that's what I should
 enter there (other options use False keyword I noticed).  I have an
 email to their support on that.

 After conversion I pull up the file in quicktime and check the movie
 stats and it shows the file as a H.264 with 30 fps with a bit rate
 under 600, seems like I'm close to teh specs and the conversion is
 successful.  Still no cigar when using in Android though..

 Can anyone give me some suggestions?  I'll post the file if someone
 has the talent to analze it.

 Thanks for taking your time to consider my problem!
--~--~-~--~~~---~--~~
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: Not possible to use MediaRecordr without SD card?

2009-01-12 Thread Dave Sparks

You should be able to write a file in your app's private data
directory.

On Jan 10, 2:19 pm, hmmm akul...@mail.ru wrote:
 Hi,

 I can see that MediaRecorder class successfully performs audio recording when 
 I specify an output file on the SD card, such as /sdcard/newaudio.3gpp

 But when I specify a file which is not on the SD card MediaRecorder throws an 
 exception saying 'start failed'

 Ok, so is it by design that we can record media only on SD card? Or can I 
 still somehow record new media in the internal filesystem?

 Thanks!
--~--~-~--~~~---~--~~
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: Inject key event for call camera app

2009-01-12 Thread Dave Sparks

I'll have to look into it, but there should be an extra you can put in
in the intent to specify image quality. If not, then we should add it.

On Jan 10, 1:38 am, fala70 fal...@gmail.com wrote:
 No I don't want use android.media.action.IMAGE_CAPTURE intent,
 because it return only a low image resolution. I want use an other
 method. Use the camera default application and listen the new picture
 added into the image provider. For that I looking for a solution to
 run camera application from my activity.
 Somebody know I do it ?

 On 9 Gen, 19:39, Dave Sparks davidspa...@android.com wrote:

  You want to broadcast android.media.action.IMAGE_CAPTURE intent.

  On Jan 9, 9:55 am, fala70 fal...@gmail.com wrote:

   Hi guys,

   Somebody know how can I call the camera capture application from my
   application ? I tried to use inject key event without success using
   KEY CAMERA BUTTON. If  the user push key camera button from any
   applications, the camera capture application work. Is there a mode to
   call camera capture application from my activiy ?

   Thanks at all
   Stefano
--~--~-~--~~~---~--~~
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: JNI - FindClass() returns null

2009-01-12 Thread Dave Sparks

Of the top of my head, I think you need to createThreadEtc with the
flag to indicate that your thread will call into Java.

On Jan 9, 2:00 pm, redlight9...@gmail.com redlight9...@gmail.com
wrote:
 i am trying to make callbacks to my android application from a native
 C thread using JNI.  however when i call FindClass it returns a NULL
 value.   i need to get the jclass value returned by FindClass() to
 call GetStaticMethoID to make calls back up to my android application.

 i store the JavaVM* globally that i receive from JNI_OnLoad which gets
 called from the android thread when my application loads my shared
 library.  I then use that JavaVM* to attach the java virtual machine
 to my native C thread by calling AttachCurrentThread() which returns a
 0 value indicating success.

 the weird thing is that when i make calls to FindClass() in the
 android thread it works fine and returns a valid value.  however when
 i call FindClass() from the native C thread it returns NULL.  I was
 thinking that it might have something to do with the native C thread
 not have the proper classpath set up?  any help would be greatly
 appreciated.

 my code is down below, i omitted error checking and some of the code
 to save space.

 #include JNIHelp.h
 #include jni.h
 #include utils/Log.h

 static JavaVM *jvm;

 static void androidCback(int event)
 {
 jint r;
 jclass cls;
 JNIEnv *env;
 jmethodID mid;

 r = (*jvm)-AttachCurrentThread(jvm, env, NULL);

 /* !!! FindClass returns NULL !!! */
 cls = (*env)-FindClass(env, com.android.SomeApp.Class);

 mid = (*env)-GetStaticMethodID(env, cls, handleEvent, (I)V);
 (*jvm)-DetachCurrentThread(jvm);

 }

 JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved)

 {

 JNIEnv *env;

 JNINativeMethod meth;

 jclass k;

 jint r;

 r = (*vm)-GetEnv (vm, (void **) env, JNI_VERSION_1_4);

 /* !!! FindClass returns valid value !!! */
 k = (*env)-FindClass (env, com.android.SomeApp.Class);

 /* save the java virtual machine globally */
 jvm = vm;

 meth.name = enableNative;

 meth.signature = (I)Z;

 meth.fnPtr = enableNative;

 r = (*env)-RegisterNatives (env, k, meth, 1);

 }

 JNIEXPORT void JNI_OnUnload(JavaVM *vm, void *reserved)

 {

 JNIEnv *env;

 jclass k;

 jint r;

 r = (*vm)-GetEnv (vm, (void **) env, JNI_VERSION_1_4);

 /* !!! FindClass returns valid value !!! */
 k = (*env)-FindClass (env, com.android.SomeApp.Class);

 (*env)-UnregisterNatives(env, k);

 }
--~--~-~--~~~---~--~~
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: Why is Ringtone.play() sometimes silent when the screen is off ?

2009-01-14 Thread Dave Sparks

I'd have to look at the code, but it doesn't surprise me. The phone
app/lock screen is a tricky bit of code and I don't think it was
intended for the ringtone to play while the screen is off.

Is there a reason you chose the Ringtone class to play your sound?
There are other options e.g. Notification Manager, MediaPlayer.

On Jan 14, 4:16 pm, jarkman jark...@gmail.com wrote:
 We have an app which uses Ringtone.play() to play tones.

 We've found that when the screen is off, calls of Ringtone.play() in
 our Activity do not make any noise (although the activity is
 definitely running).

 However, calls of Ringtone.play() from our BroadcastReceiver always
 make a noise, even when the screen is off.

 What's going on here ? Is this a deliberate platform behaviour ?

 Thanks,

 Richard
--~--~-~--~~~---~--~~
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: Streaming MP4s on Android

2009-01-14 Thread Dave Sparks

If it won't play from the SD card, it isn't going to stream either. I
read the thread you referenced in your original message and it leaves
out a lot of details. Information below is for H.264 AVC codec on the
G1:

Performance is rated for AVC baseline profile Level 1.3. A
conservative bit rate for video stream is 384Kbps, although I've
pushed it to 600Kbps and beyond. It depends a lot on how good the
encoder is at smoothing out complexity - big bursts of complex frames
can bring the decoder to its knees and even make the audio break up.
Max frame size is 480x320 @ 30 fps. It does not support B-frames, so
make sure you disable that in your encoder.

For streams, the 'moov' atom must appear before the 'mdat' atom.

On Jan 14, 3:38 pm, Qchan ultrae...@gmail.com wrote:
 No messages concerning the video shows in the log output.
 Also, the video won't play via sdcard either.

 On Jan 14, 1:42 pm, rktb yend...@pv.com wrote:

  Hi,

  Can you play the same content if you push it onto your sdcard?

  Do you see any related messages in the adb log output?

  -Ravi

  On Jan 14, 4:56 pm, Qchan ultrae...@gmail.com wrote:

   Hi!
   I'll get straight to the point.
   I was able to stream this file using the SDK on 
   Linux.http://groups.google.com/group/android-developers/browse_thread/threa...

   However, I cannot stream my own here:http://ultraedge.net:88/test.mp4

   Just to let you all know, my mp4 meets all the criteria for the media
   player on android to actually play it. It's a progressive streamable
   file (thanks to mp4box), yet it still won't stream.
   The most I get is perhaps a white box. Anyone have any insight on this?
--~--~-~--~~~---~--~~
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: Inject key event for call camera app

2009-01-15 Thread Dave Sparks

The Cupcake SDK will include a way of specifying the image quality.

On Jan 12, 8:52 am, Dave Sparks davidspa...@android.com wrote:
 I'll have to look into it, but there should be an extra you can put in
 in the intent to specify image quality. If not, then we should add it.

 On Jan 10, 1:38 am, fala70 fal...@gmail.com wrote:

  No I don't want use android.media.action.IMAGE_CAPTURE intent,
  because it return only a low image resolution. I want use an other
  method. Use the camera default application and listen the new picture
  added into the image provider. For that I looking for a solution to
  run camera application from my activity.
  Somebody know I do it ?

  On 9 Gen, 19:39, Dave Sparks davidspa...@android.com wrote:

   You want to broadcast android.media.action.IMAGE_CAPTURE intent.

   On Jan 9, 9:55 am, fala70 fal...@gmail.com wrote:

Hi guys,

Somebody know how can I call the camera capture application from my
application ? I tried to use inject key event without success using
KEY CAMERA BUTTON. If  the user push key camera button from any
applications, the camera capture application work. Is there a mode to
call camera capture application from my activiy ?

Thanks at all
Stefano
--~--~-~--~~~---~--~~
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: Make a video with Android

2009-01-15 Thread Dave Sparks

Video recording is not supported in SDK 1.0.

On Jan 14, 1:55 pm, ANDREA P andrewpag...@gmail.com wrote:
 I want to make a program that recording a video in Android

 There is an example 
 herehttp://code.google.com/intl/it-IT/android/toolbox/apis/media.html

 The class used is MediaRecorder.

 but there are many errors when I use this code in eclipse.

 Help me please !!!
--~--~-~--~~~---~--~~
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: audio recording to split (small) files without dropping or overlapping samples

2009-01-15 Thread Dave Sparks

I am pretty sure that won't work. Why do you want to record a bunch of
small audio files without dropping samples?

On Jan 14, 7:52 pm, flatmax flat...@gmail.com wrote:
 Hi there,

 Has anyone managed to record audio to small files without dropping
 samples between ?

 perhaps it is possible to use two recorders which toggle between
 recording states ... when on is recording, the other is priming and
 waiting to record ...

 Something like :

 //declare two recorders
 MediaRecorder recorder1 = new MediaRecorder();
 MediaRecorder recorder2 = new MediaRecorder();

 /// continuously prime, start and stop the two streams so one is
 always capturing ...

 //prime and start recorder1 - this is the loop roll in
 recorder1.setAudioSource
 recorder1.setOutputFormat
 recorder1.setAudioEncoder
 recorder1.setOutputFile
 recorder1.prepare
 recorder1.start

 while (1){

 //prime and start recording from recorder2
 recorder2.setAudioSource
 recorder2.setOutputFormat
 recorder2.setAudioEncoder
 recorder2.setOutputFile
 recorder2.prepare

 //wait a certain ammount of time to allow capture
 sleep

 recorder2.start

 recorder1.stop
 recorder1.reset

 //prime recorder1
 recorder1.setAudioSource
 recorder1.setOutputFormat
 recorder1.setAudioEncoder
 recorder1.setOutputFile
 recorder1.prepare

 //wait a certain ammount of time to allow capture
 sleep

 /// switch recorders
 recorder1.start

 recorder2.stop
 recorder2.reset

 }

 recorder1.release();
 recorder2.release();
--~--~-~--~~~---~--~~
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: Capturing the PictureWasTaken event

2009-01-15 Thread Dave Sparks

The takePicture() function captures an image.The callback occurs when
the picture has been captured and encoded. You aren't seeing the
callback in your app because you haven't started preview mode. It
cannot be used to capture an image from another application.

Even this did work, it doesn't necessarily mean the the user has taken
a picture. It could be an application like a barcode scanner or OCR
that is capturing an image for analysis.

I think you want to look at MediaStore. It might broadcast an intent
when new media is added, or perhaps you can wake up periodically and
scan for new images that have been added since the last time you
scanned the database.

On Jan 15, 1:05 am, GiladH gila...@gmail.com wrote:
 Hey,

 I want to be able to capture the above system event in a _global_
 manner.
 That is - even if my app is currently not running, I want the system
 to start it, so it can handle
 a new-picture-just-taken event by the user.

 I tries to do by creating a BOOT_COMPLETED BroadcastReceiver that
 internall calls:
Camera.open().takePicture( null, null, My_jpegImageCallback);

 The results:

 BroadcastReceiver successfully called at startup
 My_jpegImageCallback NOT called when user is taking a new picture.

 Pls advise.
 GiladH
--~--~-~--~~~---~--~~
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: Is it possible to put more than 2 video players in one activity?

2009-01-15 Thread Dave Sparks

We have never tested that scenario on the G1 or the emulator and I
would be surprised if it worked. The hardware video decoder can only
support one decode at a time, which means the second stream would fall
back to a software codec. I'm not saying it can't work, but if it
doesn't, we probably won't be jumping on this bug for awhile.

There is no such thing as an application running in background on
Android. Take a look at the Activity Lifecycle documentation on the
android.com developer's site. If your application does not have focus,
it is not running and you need to save your state because your
application may be killed at any time. If you need something to run in
the background, it must be a service, and a service is not an
application. CPU cycles equate directly to battery life, so services
should be lightweight processes.

I think you need to scale down your expectations a little, this is not
a desktop computer connected to the power grid.

On Jan 15, 6:08 pm, mongd mongdl...@gmail.com wrote:
 Hi, I'm trying to implement a simple media player that plays 2
 different videos at the same time. (I mean on the same activity.)
 Based on the media player in API demos, I added another surface view,
 copied the rest of the code for the media player and changed the names
 of variables accordingly.
 This code kept crashing when the second media player tried prepare()
 without throwing exception message. Is there anyone who know how to
 implement this kind of functionality on android? Or, does not Android
 allow this kind of implementation?

 Also, another question is, is it possible to run the same application
 twice at the same time?
 I mean... as far as I understood, I can make applications run in
 background by using 'service', so in this way, I guess it would be
 possible to run the same application when one of them is running in
 background. Am I right?

 I just started to look into Android, so I'm trying to figure out what
 Android can/can't do.
 Please help me~ =D

 Thank you so much in advance.
--~--~-~--~~~---~--~~
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: What is OpenCore

2009-01-16 Thread Dave Sparks

OpenCore is the media playback and authoring engine used to render
most (but not all) of the media content for Android. As an application
developer, you don't access it directly, you access it through the
MediaPlayer interface.

On Jan 16, 11:18 pm, Tez earlencefe...@gmail.com wrote:
 Hi,

 Can anyone tell me what is OpenCore and how do i use it?

 cheers,
 Earlence
--~--~-~--~~~---~--~~
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: audio recording to split (small) files without dropping or overlapping samples

2009-01-16 Thread Dave Sparks

OK, now I see where you going with it. :)

What you want is coming in Cupcake. There is a streaming interface for
audio input and output that gives you an array of audio samples you
can do your signal processing on.

If you need something for SDK 1.0, there is a MediaRecorder function
called getMaxAmplitude(). You should be able to get what you want by
writing the audio file to /dev/null and calling into getMaxAmplitude
periodically. Take a look at the source code for SoundRecorder on
android.git.kernel.org.

On Jan 16, 3:20 pm, Matt Flax flat...@gmail.com wrote:
 we are implementing a sound level meter. For privacy reasons, we don't want
 the audio lying around on the disk.

 We could do it on the fly without recording to disk, however I don't think
 that is possible with the sdk ... is it ?

 Matt

 On Fri, Jan 16, 2009 at 12:16 PM, Dave Sparks davidspa...@android.comwrote:





  I am pretty sure that won't work. Why do you want to record a bunch of
  small audio files without dropping samples?

  On Jan 14, 7:52 pm, flatmax flat...@gmail.com wrote:
   Hi there,

   Has anyone managed to record audio to small files without dropping
   samples between ?

   perhaps it is possible to use two recorders which toggle between
   recording states ... when on is recording, the other is priming and
   waiting to record ...

   Something like :

   //declare two recorders
   MediaRecorder recorder1 = new MediaRecorder();
   MediaRecorder recorder2 = new MediaRecorder();

   /// continuously prime, start and stop the two streams so one is
   always capturing ...

   //prime and start recorder1 - this is the loop roll in
   recorder1.setAudioSource
   recorder1.setOutputFormat
   recorder1.setAudioEncoder
   recorder1.setOutputFile
   recorder1.prepare
   recorder1.start

   while (1){

   //prime and start recording from recorder2
   recorder2.setAudioSource
   recorder2.setOutputFormat
   recorder2.setAudioEncoder
   recorder2.setOutputFile
   recorder2.prepare

   //wait a certain ammount of time to allow capture
   sleep

   recorder2.start

   recorder1.stop
   recorder1.reset

   //prime recorder1
   recorder1.setAudioSource
   recorder1.setOutputFormat
   recorder1.setAudioEncoder
   recorder1.setOutputFile
   recorder1.prepare

   //wait a certain ammount of time to allow capture
   sleep

   /// switch recorders
   recorder1.start

   recorder2.stop
   recorder2.reset

   }

   recorder1.release();
   recorder2.release();

 --http://www.flatmaxstudios.com
--~--~-~--~~~---~--~~
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: audio recording to split (small) files without dropping or overlapping samples

2009-01-16 Thread Dave Sparks

I was just guessing that maybe the OP's use case wasn't actually
recording small files, but rather he was running into a limitation in
the framework and searching for a workaround.

On Jan 16, 3:35 pm, Dan Bornstein danf...@android.com wrote:
 On Thu, Jan 15, 2009 at 5:16 PM, Dave Sparks davidspa...@android.com wrote:
  I am pretty sure that won't work. Why do you want to record a bunch of
  small audio files without dropping samples?

 Not that this is a target that Android explicitly caters to, but my
 portable digital recorder can be set to record fixed-length files
 (where the length is settable), starting a new one automatically if
 you let it keep recording.

 -dan
--~--~-~--~~~---~--~~
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: Camera Focus Facility

2009-01-20 Thread Dave Sparks

Camera.autoFocus(cb);

where cb is a callback function you supply that tells you focus is
successful or not.

On Jan 20, 5:27 am, mobilek...@googlemail.com
mobilek...@googlemail.com wrote:
 Hi,

 My app is struggling to take focused shots. Is there a built in
 facility that sets an auto-focus property on the camera, so it
 automatically takes clear and focused images. I've noticed that
 feature in numerous well-known apps such as ShopSavvy,
 CompareEverywhere, etc.

 Could you advise on how to achieve that?

 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] Re: taking picture from emulator, if pc having webcam

2009-01-20 Thread Dave Sparks

No, this is not supported.

On Jan 20, 3:57 am, jalandar jagtap...@gmail.com wrote:
 is it possible to take photo with emulator's camera?, if the pc(on
 emulator is there) having web cam
 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
-~--~~~~--~~--~--~---



  1   2   3   4   >