android调用系统相机

Intent intent = new Intent();
                intent.setPackage("com.android.camera");
                intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
                startActivityForResult(intent, 1);

 

                Intent intent = new Intent();
                intent.setPackage("com.android.camera");
//                intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
                startActivityForResult(intent, 1);

 

Intent imageCaptureIntent = new Intent("android.media.action.STILL_IMAGE_CAMERA"); 
               startActivityForResult(imageCaptureIntent,1);

 包名+主类名才是王道。

 

相机:

1 12-21 17:46:42.539: I/System.out(32483): com.android.camera
2 12-21 17:46:42.539: I/System.out(32483): com.android.camera.Camera

 

打电话:

1 12-21 17:43:22.756: I/System.out(30133): com.android.contacts
2 12-21 17:43:22.756: I/System.out(30133): com.android.contacts.activities.TwelveKeyDialer

收音机:

1 12-21 17:48:17.180: I/System.out(32483): com.miui.fmradio
2 12-21 17:48:17.190: I/System.out(32483): com.miui.fmradio.FmRadioActivity

联系人:

1 12-21 17:49:16.883: I/System.out(32483): com.android.contacts
2 12-21 17:49:16.883: I/System.out(32483): com.android.contacts.activities.PeopleActivity

自己写的老人桌面:

1 12-21 17:50:01.461: I/System.out(32483): com.highxin.launcher01
2 12-21 17:50:01.461: I/System.out(32483): com.highxin.launcher01.MainActivity

 

posted @ 2014-12-18 15:57  疾风剑  阅读(1451)  评论(0编辑  收藏  举报