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. RMA Uhuy..

Guys... mau sharing happy story nih..

bulan februari lalu saya pernah posting kalau port USB archos 101it tiba2
tidak berfungsi cuma gara2 update firmware

update demi update saya berharap bisa idup lagi si USB port nya... taunya ga
idup2 juga sampai sekarang..

yang alami itu banyak di dunia ini... kalau cek di forum2 archos.. banyak
yang alami hal sama seperti saya...

entah kenapa.. kemaren tergerak untuk search lagi di google soal usb mati
akibat update firmware...

ketemu ini..

http://www.arctablet.com/blog/archos-tablet/usb-host-problem-archos-gen8-archos-10170433228-it/

disitu disebutkan

" If your tablet still does not recognize *simpler *devices, then you should
contact Archos support to confirm the failure and issue an RMA to get a new
device."

Hmm...  saya coba email support nya archos dan juga archos indonesia (
http://www.concept2tech.com/ )

saya coba tanyakan soal masalah saya dan apakah bisa mendapatkan penukaran
unit.

WOW..
ga sampai berapa jam sudah dibalas... saya diminta kirim unit saya untuk
diganti unit baru...

Keren!

SALUT! BRAVO! buat service Concept 2 Technology yang kebetulan sebagai
principal Archos Indonesia...

Puas banget ... walau kudu jadi modal lagi untuk beli Screen Protector
baru... hehe.


Demikian sharingnya..


Salam!

Safitry Ozawa



--------------------------------
*
*
Automotive Tips and Sharing
powered by kemangnet.com

-- 
===============

2. Facedetector issue

Hey guys,

I have a problem here, I used the facedetector tutorial provided by
Google and got it working. Once I did this I tried creating a menu
that allows a user to take a picture and then once taken, choose an
image to be recognized. The problem arises with the face detection. I
can display the image from the gallery but when I try and recognize a
face within the image it doesn't work.

The code below shows my code;

[code]

   public void onDraw(Canvas canvas) {
    // TODO Auto-generated method stub

             canvas.drawBitmap(bitmap, 0, 0, null);

             Paint myPaint = new Paint();
             myPaint.setColor(Color.GREEN);
             myPaint.setStyle(Paint.Style.STROKE);
             myPaint.setStrokeWidth(3);

             for(int i=0; i < numberOfFaceDetected; i++)
             {
              Face face = myFace[i];
              PointF myMidPoint = new PointF();
              face.getMidPoint(myMidPoint);
              myEyesDistance = face.eyesDistance();
              canvas.drawRect(
                (int)(myMidPoint.x - myEyesDistance),
                (int)(myMidPoint.y - myEyesDistance),
                (int)(myMidPoint.x + myEyesDistance),
                (int)(myMidPoint.y + myEyesDistance),
                myPaint);
             }
   }


   @Override
       public void onActivityResult(int requestCode, int resultCode,
Intent
data) {

               if (requestCode == ACTIVITY_SELECT_IMAGE && resultCode
== RESULT_OK)
{
                       try {
                               Uri currImageURI = data.getData();
                               String[] proj = { Images.Media.DATA,
Images.Media.ORIENTATION };
                               Cursor cursor =
managedQuery(currImageURI, proj, null, null,null);
                               int columnIndex =
cursor.getColumnIndex(proj[0]);
                               cursor.moveToFirst();
                               mCurrentImagePath =
cursor.getString(columnIndex);
                               BitmapFactory.Options
BitmapFactoryOptionsbfo = new
BitmapFactory.Options();
 
BitmapFactoryOptionsbfo.inPreferredConfig =
Bitmap.Config.RGB_565;
                               Bitmap bitmap =
BitmapFactory.decodeFile(mCurrentImagePath);
                               int width = bitmap.getWidth();
                               int height = bitmap.getHeight();
                               myFace = new
FaceDetector.Face[numberOfFace];
                               myFaceDetect = new FaceDetector(width,
height, numberOfFace);
                               numberOfFaceDetected =
myFaceDetect.findFaces(bitmap, myFace);

                               mImageView.setImageBitmap(bitmap);




                        catch (Exception e) {
                       }






               }

[/code]

-- 

3. problems with listview

4. Blank screen when running NativeActivity sample

5. to implement a gallery getting resource from a webservice

6. WebView not responding to KEYCODE_DPAD_CENTER the same way as a Touch

7. Important: XmlPullParserException while accessing SOAP webservice in Android