当前位置: 编程技术>移动开发
本页文章导读:
▪thread 过程 报错 can not creat handler inside thread thread 进程 报错 can not creat handler inside thread
参考:http://apps.hi.baidu.com/share/detail/33316734
new Thread(new Runnable() {
@Override
public void run() {
Looper.prepa.........
▪ 调用取舍图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能 调用选择图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能
//选择图片 requestCode 返回的标识 Intent innerIntent = new Intent(Intent.ACTION_GET_CONTENT); //"android.intent.action.GET_CONTENT" innerI.........
▪ 一个好玩儿的沙画游戏 一个有意思的沙画游戏
沙画游戏SaPainthttp://itunes.apple.com/us/app/sapaint/id444902073?mt=8欢迎提出宝贵意见Sandpainting is the art of pouring colored sands, powdered pigments from minerals or crystals, and pigments from other.........
[1]thread 过程 报错 can not creat handler inside thread
来源: 互联网 发布时间: 2014-02-18
thread 进程 报错 can not creat handler inside thread
参考:http://apps.hi.baidu.com/share/detail/33316734
new Thread(new Runnable() {
@Override
public void run() {
Looper.prepare();
todo();
Looper.loop();
}
}).start();
[2] 调用取舍图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能
来源: 互联网 发布时间: 2014-02-18
调用选择图片、视频、添加音频、录音、拍摄视频、拍照等其他的功能
//选择图片 requestCode 返回的标识
Intent innerIntent = new Intent(Intent.ACTION_GET_CONTENT); //"android.intent.action.GET_CONTENT"
innerIntent.setType(contentType); //查看类型 String IMAGE_UNSPECIFIED = "image/*"; 详细的类型在 com.google.android.mms.ContentType 中
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", 60);
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("content://mms/scrapSpace");
startActivityForResult(intent, REQUEST_CODE_TAKE_PICTURE);
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/GEOLO/archive/2011/06/21/6557860.aspx
//选择图片 requestCode 返回的标识
Intent innerIntent = new Intent(Intent.ACTION_GET_CONTENT); //"android.intent.action.GET_CONTENT"
innerIntent.setType(contentType); //查看类型 String IMAGE_UNSPECIFIED = "image/*"; 详细的类型在 com.google.android.mms.ContentType 中
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", 60);
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("content://mms/scrapSpace");
startActivityForResult(intent, REQUEST_CODE_TAKE_PICTURE);
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/GEOLO/archive/2011/06/21/6557860.aspx
[3] 一个好玩儿的沙画游戏
来源: 互联网 发布时间: 2014-02-18
一个有意思的沙画游戏
沙画游戏SaPaint
http://itunes.apple.com/us/app/sapaint/id444902073?mt=8
欢迎提出宝贵意见
Sandpainting is the art of pouring colored sands, powdered pigments from minerals or crystals, and pigments from other natural or synthetic sources onto a surface to make a painting. These are often temporary, ritual paintings prepared for religious or healing ceremonies. It is also referred to as drypainting.Sandpainting is practiced by Native Americans in the Southwestern United States, by Tibetan monks, by Indians, by Australian Aborigines, and by Latin Americans on certain Christian holy days.
沙画游戏SaPaint
http://itunes.apple.com/us/app/sapaint/id444902073?mt=8
欢迎提出宝贵意见
Sandpainting is the art of pouring colored sands, powdered pigments from minerals or crystals, and pigments from other natural or synthetic sources onto a surface to make a painting. These are often temporary, ritual paintings prepared for religious or healing ceremonies. It is also referred to as drypainting.Sandpainting is practiced by Native Americans in the Southwestern United States, by Tibetan monks, by Indians, by Australian Aborigines, and by Latin Americans on certain Christian holy days.
最新技术文章: