Oleksiy
Oleksiy

Reputation: 39800

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

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 it possible at all or should I stop trying?


Here is the code that I am using right now:

Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
startActivityForResult(i, CAMERA_REQUEST); 

This is what currently happens:

enter image description here enter image description here

And this is what I need to achieve:

enter image description here


Thank you!

Upvotes: 13

Views: 2821

Answers (3)

saurabh dixit
saurabh dixit

Reputation: 873

You can open paranoma mode using below code

 Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
    startActivity(intent);

Upvotes: 0

Pankaj Arora
Pankaj Arora

Reputation: 10274

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

Upvotes: 0

Esteam
Esteam

Reputation: 1941

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?

Upvotes: 2

Related Questions