Galería de llamadas de Android para la imagen y el vídeo

Cuando tengo que obtener alguna imagen o video

Me gustó esto

Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("video/*"); startActivityForResult(intent , ActNetwork.EXTRA_FLAG_SEARCH_LOCAL_VOD); 

y

 Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("image/*"); startActivityForResult(intent , ActNetwork.EXTRA_FLAG_SEARCH_LOCAL_VOD); 

Yo intento

  Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("image/* , video/*"); 

Pero en error ocurrido

Como puedo resolver ese problema

Gracias su respuesta

Prueba esto

 final Intent galleryIntent = new Intent(Intent.ACTION_GET_CONTENT); galleryIntent.setType("image/* video/*"); startActivityForResult(galleryIntent, REQUEST_CODE); 

Has intentado con

 Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("media/*"); startActivityForResult(intent , ActNetwork.EXTRA_FLAG_SEARCH_LOCAL_VOD); 

Prueba esto

 intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(intent, 1); 

Funciona en 2.1

También estaba teniendo el mismo problema y encontré la solución.

 Intent pickerIntent = new Intent(Intent.ACTION_GET_CONTENT); pickerIntent.setType("image/*, video/*"); pickerIntent.putExtra(Intent.EXTRA_MIME_TYPES, new String[] {"image/*", "video/*"}); startActivityForResult(pickerIntent, REQUEST_CODE_FOR_MEDIA); 

La clave aquí es pickerIntent.putExtra (Intent.EXTRA_MIME_TYPES, new String [] {"image / *", "video / *"});

FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.