2014-03-05 102 views
12

我主要对全景选项感兴趣。有没有办法打开本机相机应用程序(增强版),所以用户可以在普通照片和全景视图之间切换?有没有可能,或者我应该停止尝试?如何使用其他选项(如Panorama)实现相机功能?


这里是我使用的是现在的代码:

Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
startActivityForResult(i, CAMERA_REQUEST); 

这是目前发生的情况:

enter image description hereenter image description here

而这正是我需要实现:

enter image description here


谢谢!

回答

0

还有就是要做到这一点没有标准的方式。 AFAIK Panorama,Photoshere是 Gallery3d(由Google提供)package com.google.android.gallery3d的专有功能。这取决于设备的固件的 。

清单文件

<activity clearTaskOnLaunch="true" screenOrientation="0" 
    name="com.google.android.apps.lightcycle.ProtectedPanoramaCaptureActivity" 
    theme="resource_id:0x1030007" 
    configChanges="1184" 
    label="resource_id:0x7f0a00b2" 
    windowSoftInputMode="35" 
    taskAffinity="com.google.android.camera"> 

<intent-filter> 
<action name="android.intent.action.MAIN"> 
</action> 
</intent-filter> 
</activity> 

在活动

Intent res = new Intent(); 
String mPackage = "com.google.android.gallery3d"; 
String mClass = "com.google.android.apps.lightcycle.ProtectedPanoramaCaptureActivity"; 
res.setComponent(new ComponentName(mPackage,mClass)); 
startActivity(res); 
+0

打开paranoma模式,这将不会返回拍摄图像的路径,我不明白它在这里会有用。 –

0

您可以使用下面的代码

Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA); 
    startActivity(intent);