Sony Addon SDK
This project is no longer being supported and will not get any further updates.
The Camera Add-on API provides classes which manage registration for the Camera Add-on framework as well as interfaces which allow navigating the Camera Add-on UI.
Below is a block diagram of the Camera Add-on framework.
The Camera Add-on framework provides two functions:
- Registers application as a Sony Mobile camera mode.
- Allows your client application to open the camera mode selector.
To register your add-on, add the following information into AndroidManifest.xml of the client application.
<uses-library android:name="com.sonymobile.camera.addon.api" />
<?xml version="1.0" encoding="utf-8"?>
name="sample mode name"
In this xml file, there are two types of attributes. The first attributes are mandatory attributes, while the others are optional attributes. If mandatory attributes are not set, the mode is not registered as a add-on application. Mandatory attributes are "name", "selectorIcon", "selectorLabel" and "descriptionLabel". Optional attributes are "shortcutIcon", "shortcutLabel" and <uses-feature>.
The "name" attribute is the name of the mode. This is registered into the database of the Camera Add-on framework, but is not shown to the user. The attributes have the following restrictions:
- Should be written in plain text. String resource ID should not be used.
- Should be unique in the Camera Add-on application package.
- Should be at most 100 characters long.
- Should contain only 0~9, a~z, A~Z, ‘ ’(whitespace), ‘.’(period), ‘_’(underscore).
The "selectorIcon" is the icon resource which is shown in the camera mode selector. The "selectorLabel" is the text which is shown in the camera mode selector. This text indicates the name of the mode. The "descriptionLabel" is the text which is shown in the camera mode selector. This text explains what the user can do with the mode. The "shortcutIcon" and "shortcutLabel" are shown in a view when creating a shortcut icon on the Home screen. When both "shortcutIcon" and "shortcutLabel" are set, those resources are displayed in the view. The <uses-feature> specifies the features that the client application requires. The Camera Add-on framework checks the features that the device supports and only registers the add-on if the device supports those features. Supported values are the same as the "android:name" values of Android. The value of all of the others which android supports, i.e. "android:required" and "android:glEsVersion" are ignored even if you add them here. This part can be omitted if the add-on does not require any specific device features.
Although multiple modes can be added by using <mode> tag, this is NOT recommended. In the Camera Add-on framework, the user has the ability to delete camera modes. If multiple modes in a single apk exist, the user may inadvertently delete all modes when he/she only intended to delete one.
This view allows you to switch to other camera modes from within your application. Please refer to