我在Android 4.2 Jelly Bean中遇到了问题。
如何从我的应用程序中打开相机,默认情况下是全景/360光球模式?
我在grepcode和Camera.Parameters上搜索了很多,但似乎没有什么帮助。除了视频和图像之外,有没有人知道如何在全景模式下打开摄像头?
发布于 2013-03-18 04:09:56
没有标准的方法可以做到这一点。AFAIK全景图,Photoshere是Gallery3d (由谷歌提供)包com.google.android.gallery3d的专有功能。这取决于设备的固件。
在ApplicationManifest.xml中
<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);但它在相机应用程序中加入了NullPointerException。
发布于 2013-04-25 18:46:30
我也希望在我的应用程序中打开光球相机,或者至少在普通相机中显示光球选项。我搜索了很多,但我没有找到任何解决方案。
我认为我们没有任何打开photosphere camera.We的解决方案,需要等待下一个Android API发布。
发布于 2017-08-17 21:10:24
你可以使用下面的代码打开所有默认的摄像头功能
Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
startActivity(intent);https://stackoverflow.com/questions/15377663
复制相似问题