我在 Android 4.2 Jelly Bean 中遇到了一个问题。
如何从我的应用程序中打开相机(默认情况下处于全景/360 度光球模式)?
我已经搜索了很多grepcode http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.1.2_r1/com/android/camera/Camera.java并且相机参数 http://developer.android.com/reference/android/hardware/Camera.Parameters.html,但似乎没有任何帮助。除了视频和图像之外,有人有任何线索以全景模式打开相机吗?
没有标准的方法可以做到这一点。
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>
我尝试从我的应用程序启动此活动
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 。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)