選擇器:其作用是顯示一個Activity選擇器
http://deep-fish.iteye.com/blog/2054119
Intent.ACTION_CHOOSER = “android.intent.action.CHOOSER”
//分享
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType("text/plain");
Intent intent2 = new Intent();
intent2.setAction(Intent.ACTION_CHOOSER);
intent2.putExtra(Intent.EXTRA_TITLE, "please selete a app");
intent2.putExtra(Intent.EXTRA_INTENT, intent);
startActivity(intent2);
也可以createChooser方法。
通訊錄
Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI);
startActivityForResult(intent, PICK_CONTACT);
音頻
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("audio/*");
startActivity(Intent.createChooser(intent, "Select music"));
文件
MIME type類型選用(文件 圖片) 類型選擇(棄用deprecated)
Intent myIntent = new Intent(Intent.ACTION_PICK);
myIntent.setType("image/*");
startActivityForResult(i, 100);
圖片獲取url 可得到數據create the data as it runs
Intent myIntent = new Intent(Intent.ACTION_GET_CONTENT, null);
myIntent.setType("image/*");
startActivityForResult(i, 100);
http://blog.csdn.net/chenzheng_java/article/details/6266135
Intent.ACTION_PICK Android.intent.action.PICK 從列表中選擇某項並返回所選數據
ACTION_GET_CONTENT Android.intent.action.GET_CONTENT 讓用戶選擇數據,並返回所選數據
拍照
http://blog.csdn.net/csqingchen/article/details/45502813
MediaStore.ACTION_IMAGE_CAPTURE
裁剪
http://blog.csdn.net/eclothy/article/details/42719217
com.android.camera.action.crop
注意添加權限