How to implement Camera functionality with extra options (like Panorama)?

后端 未结 3 1900
伪装坚强ぢ
伪装坚强ぢ 2021-02-13 19:40

I am mainly interested in panorama option. Is there a way to open the native Camera app (the enhanced version), so the user can switch between normal photo and panorama view? Is

相关标签:
3条回答
  • 2021-02-13 19:51

    Apparently, it is not yet possible to use panorama or photosphere modes directly from an application since they depend on proprietary classes provided by Google. Maybe it will be possible in the next Android API release.

    See How to open camera directly in panorama/photosphere mode? or How to open photosphere camera?

    0 讨论(0)
  • 2021-02-13 19:52

    You can open paranoma mode using below code

     Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
        startActivity(intent);
    
    0 讨论(0)
  • 2021-02-13 20:03

    There is no standard way to do it. AFAIK Panorama, Photoshere are proprietary features of Gallery3d (provided by Google) package com.google.android.gallery3d. It's depends on firmware of the device.

    in manifest file

       <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>
    

    in your 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 讨论(0)
提交回复
热议问题