//选择图片 requestCode 返回的标识Intent innerIntent = new Intent(Intent.ACTION_GET_CONTENT); //"android.intent.action.GET_CONTENT"innerIntent.setType(contentType); //查看类型 String IMAGE_UNSPECIFIED = "image/*";Intent wrapperIntent = Intent.createChooser(innerIntent, null);((Activity) context).startActivityForResult(wrapperIntent, requestCode);//视频Intent innerIntent = new Intent(Intent.ACTION_GET_CONTENT);innerIntent.setType(contentType); //String VIDEO_UNSPECIFIED = "video/*";Intent wrapperIntent = Intent.createChooser(innerIntent, null);((Activity) context).startActivityForResult(wrapperIntent, requestCode);//添加音频Intent innerIntent = new Intent(Intent.ACTION_GET_CONTENT);innerIntent.setType(contentType); //String VIDEO_UNSPECIFIED = "video/*";Intent wrapperIntent = Intent.createChooser(innerIntent, null);((Activity) context).startActivityForResult(wrapperIntent, requestCode);//录音Intent intent = new Intent(Intent.ACTION_GET_CONTENT);intent.setType(ContentType.AUDIO_AMR); //String AUDIO_AMR = "audio/amr";intent.setClassName("com.android.soundrecorder","com.android.soundrecorder.SoundRecorder");((Activity) context).startActivityForResult(intent, requestCode);//拍摄视频int durationLimit = getVideoCaptureDurationLimit();//SystemProperties.getInt("ro.media.enc.lprof.duration", );Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0);intent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, sizeLimit);intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, durationLimit);startActivityForResult(intent, REQUEST_CODE_TAKE_VIDEO);//拍照 REQUEST_CODE_TAKE_PICTURE 为返回的标识Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); //"android.media.action.IMAGE_CAPTURE";intent.putExtra(MediaStore.EXTRA_OUTPUT, Mms.ScrapSpace.CONTENT_URI); // output,Uri.parse(" REQUEST_CODE_TAKE_PICTURE);
推荐整理分享Android 巧用Itent.ACTION_PICK和Intent.ACTION_GET_CONTENT(android:testonly="true"),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:android中的intent,android:testonly="true",android intent用法,android ?attr,android中的intent,android如何使用,android intent用法,androidintent,内容如对您有帮助,希望把文章链接给更多的朋友!
BroadcastReceiver广播 BroadcastReceiver广播广播类型:普通、有序简单的举个例子,大体用法思路已经很清楚了,剩下的有时间在附上实现:注册---触发---响应publicclassMainActivityext
Android网络(4):HttpClient必经之路----使用线程安全的单例模式HttpClient,及HttpClient和Application的融合 zz:
android网络相关的工具类 android网络相关的工具类uses-permissionandroid:name=android.permission.INTERNET/!--查询网络状态权限--uses-permissionandroid:name=android.permission.ACCESS_NETWORK_STATE/粘过去就可