ACTION_GET_CONTENT audio, video

by Christine » Sun, 02 Aug 2009 23:18:53 GMT


Sponsored Links
 I was wondering, when you do an intent with ACTION_GET_CONTENT and
type "video/*" you get just the media browser showing you stored
video's from which you can pick one, while with type "audio/*", you
first get a chooser which lets you choose between recording audio or
selecting from the media library. For recording video you can use
MediaStore.ACTION_VIDEO_CAPTURE but I haven't found a
MediaStore.ACTION_AUDIO_CAPTURE.

In my app I'd like to have a consistent UI for video and audio,
preferably without the separate chooser step. I can do audio capture,
but how do I avoid the audio chooser without creating my own audio
gallery UI?
--~--~---------~--~----~------------~-------~--~----~



ACTION_GET_CONTENT audio, video

by Dianne Hackborn » Mon, 03 Aug 2009 15:21:08 GMT


 You -don't- want to avoid the chooser, that is what allows other
applications to supply their own functionality.  If you want to allow the
user to choose either a video or music, you may want to write your own
choose by doing your own intent query for both of those data types and
merging the result (you can use LauncherActivity to help with presenting the
list or do it yourself).






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


ACTION_GET_CONTENT audio, video

by Christine » Tue, 04 Aug 2009 17:25:45 GMT


 Maybe I should clarify. I use the ACTION_GET_CONTENT intent for both
picking audio files and video files. Apparently, the audio recorder
can handle this intent while the video recorder doesn't, which makes
my app inconsistent.




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. download and parse large zipped XML - too slow!

HI all, I've written an app that does on-the-fly download, unzip and
parsing of a big KML geographic datafile. The datafile is refreshed on
a server every hour so Ideally I'd like to refresh every now and then.

I'm running the parse in a separate thread (with very infrequent
blocks/locks) using a tiny hand-built flat-file parser (it uses
intrinsic types to remove GC stalls).

The zipped KML is about 400KB, unzipped it is 4.5MB.
Unzip buffer is 10KB.
My emulator's /proc/cpuinfo says 250 bogomips.
My code parses the zipped KML in just over 8 minutes.

I've not yet thrown parsed output into any kind of database yet - for
development I just store new classes in an ArrayList when I see KML
elements I need.

Any random thoughts or suggestions that might make refresh a bit
faster? How fast is real hardware?

--~--~---------~--~----~------------~-------~--~----~

2. About getting audio streams to A2DP headphone and Headphone

Dear All,


There is a function setRouting to set the audio for a specified mode.
                   public void setRouting (int mode, int routes, int
mask)

The parameters for the routes are:
      int ROUTE_BLUETOOTH This constant is deprecated. use
ROUTE_BLUETOOTH_SCO
      int ROUTE_BLUETOOTH_A2DP Routing audio output to bluetooth
A2DP
      int ROUTE_BLUETOOTH_SCO Routing audio output to bluetooth SCO
      int ROUTE_EARPIECE Routing audio output to earpiece
      int ROUTE_HEADSET Routing audio output to headset
      int ROUTE_SPEAKER Routing audio output to speaker
Using the OR of these parameters, theoritically we should be able to
get the routing to 2 routes. For eg. if we need blue tooth A2DP
headphone and Speaker, we should be able to achieve it using
( ROUTE_BLUETOOTH_A2DP | ROUTE_SPEAKER).

Bu it does not work as expected on say HTC phones. It will just stay
with A2DP headphone which means, it is most likely a MIPS issue as
well and the Android system default is built this way. Am I right?

Any idea on what other ways we can achieve streaming to A2DP headphone
and also to have the same stream or different stream locally played
back on speakers.



Regards
Rangan.
--~--~---------~--~----~------------~-------~--~----~

3. Accelerometer on different devices

4. MediaPlayer pause and seek

5. Request helping for writting HTTP Request in Android

6. How to disable sms notification?

7. RTC_WAKEUP