gpt4 book ai didi

android - 如何在全景/全景模式下直接打开相机?

转载 作者:可可西里 更新时间:2023-11-01 18:47:40 24 4
gpt4 key购买 nike

我在 Android 4.2 Jelly Bean 中遇到了问题。

如何从我的应用程序打开相机,默认情况下处于全景/360 全景照片模式?

我在grepcode中搜索了很多还有Camera.Parameters ,但似乎没有任何帮助。除了视频和图像,还有人知道在全景模式下打开相机的线索吗?

最佳答案

没有标准的方法来做到这一点。 AFAIK Panorama、Photoshere 是 Gallery3d 的专有功能(由 Google 提供)包 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>

我已经尝试从我的应用程序开始这个 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。

关于android - 如何在全景/全景模式下直接打开相机?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15377663/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com