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

标签 android android-camera panoramas android-4.2-jelly-bean

我在 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/

相关文章:

java - JAVA中从url获取资源xml文件

android - 使用 Libyuv 将 YUV_420 _888 转换为 ARGB

android - 如何实现 CordovaInterface 以便我可以在 webview 中使用相机?

android静音相机快门声音?

objective-c - 显示全景图像时内存泄漏

c++ - OpenCV 图像拼接 - 使用 ExposureCompensator 和 MultiabandBlender 类

android - 删除项目后,RecyclerView 不更新

Android 设备后退按钮关闭应用程序不移动到主 Activity

java - mSecurityInputMethodService 在 logcat 中为空

python - 拼接时修剪图像