Sony Addon SDK public final class

CapturingModeSelector

This project is no longer being supported and will not get any further updates.
extends java.lang.Object
  1. java.lang.Object
  2. com.sonymobile.camera.addon.capturingmode.CapturingModeSelector

Class Overview

This class opens and closes the capturing mode selector. The mode selector provides access to all registered camera modes for camera add-ons available to the user. All methods must be called from the UI thread.

Summary

Nested Classes
interface CapturingModeSelector.OnModeSelectListener Interface definition for a callback to be invoked when the user changes capturing mode to a mode which belongs to current package and activity.
interface CapturingModeSelector.OnModeFinishListener Interface definition for a callback to be invoked when the user changes capturing mode to a mode which belongs to different package or activity.
Constants
java.lang.String EXTRA_CAPTURING_MODE When an add-on app is launched from the add-on framework, an intent is received which will set the EXTRA_CAPTURING_MODE field.
Public Constructors
CapturingModeSelector(Context context, ViewGroup parentView)

Constructor.

Public Methods
void open(java.lang.String modeName)

Open capturing mode selector.

void close()

Close capturing mode selector.

boolean isOpened()

Return true if capturing mode selector is opened.

void setOnModeSelectListener(CapturingModeSelector.OnModeSelectListener onModeSelectListener)

Set a callback for capturing mode selector dialog.

void setOnModeFinishListener(CapturingModeSelector.OnModeFinishListener onModeFinishListener)

Set a callback for capturing mode selector dialog.

void setUiOrientation(int orientation)

Set the sensor orientation.

void release()

Add-on application must call this method before constructing another CapturingModeSelector object.

Constants

Added in API level 1 public static final java.lang.String EXTRA_CAPTURING_MODE

When an add-on app is launched from the add-on framework, an intent is received which will set the EXTRA_CAPTURING_MODE field.
The data type of the value is String.
The name of the add-on application that was launched is returned allowing you to determine which mode the user launched.

Constant Value: "com.sonymobile.camera.addon.intent.extra.CAPTURING_MODE"

Public Constructors

Added in API level 1 public CapturingModeSelector(Context context, ViewGroup parentView)

Constructor.

Parameters
context context
parentView parent view of the selector view

Public Methods

Added in API level 1 public void open(java.lang.String modeName)

Open capturing mode selector.

Parameters
modeName Current capturing mode name as defined in the mode XML file inside the AndroidManifest.xml Activity registration meta-data.
This value corresponds to the modeName of CapturingModeAttributes used to register capturing modes.
This modeName may be used to identify the current mode.
The add-on framework may use this for UI look and feel, for example to highlight the currently selected mode.

Added in API level 1 public void close()

Close capturing mode selector.

Added in API level 1 public boolean isOpened()

Return true if capturing mode selector is opened.

Added in API level 1 public void setOnModeSelectListener(CapturingModeSelector.OnModeSelectListener onModeSelectListener)

Set a callback for capturing mode selector dialog. See CapturingModeSelector.OnModeSelectListener

Parameters
onModeSelectListener The listener will be invoked when another mode which is in the same package and same activity is selected.

Added in API level 1 public void setOnModeFinishListener(CapturingModeSelector.OnModeFinishListener onModeFinishListener)

Set a callback for capturing mode selector dialog. See CapturingModeSelector.OnModeFinishListener

Parameters
onModeFinishListener The listener will be invoked when the current mode is finished.

Added in API level 1 public void setUiOrientation(int orientation)

Set the sensor orientation.

Parameters
orientation Should be Configuration.ORIENTATION_LANDSCAPE or Configuration.ORIENTATION_PORTRAIT.

Added in API level 1 public void release()

Add-on application must call this method before constructing another CapturingModeSelector object.