Header Ads

Develop Small Apps & IR remote sensor-related apps with the new Sony Add-on SDK


The new Xperia Tablet Z and its smartphone equivalent, Xperia Z, are the latest Sony products that include Small Apps and IR remote sensor functionality. If you’re ready to start developing your own Small Apps or your own IR remote sensor-enabled apps, you’ll want to do so using the new Sony Add-on SDK. Read on for a quick look at how you can get your development started right away!
Two of the unique functionalities you’ll find in the most recent Sony smartphones and tablets are Small Apps and the IR remote control. Small Apps are special, mini apps that can run on top of other applications, and allow true multi-tasking. You can find Small Apps functionality in the following smartphones* – Xperia ZLXperia ZXperia T,Xperia TXXperia V – and in the following tablets* – Sony Tablet SXperia Tablet S, and Xperia Tablet Z.
Small Apps on Xperia Z
Xperia™ Z running Calculator Small App.
How Small Apps work
A Small App is a framework that runs as a service in Android. However, unlike a regular service, it has a user-interface overlaid on top of the currently running activity. A Small App has access to all regular android framework APIs, and can be either a self contained app or an extension to another app, with merged code, resources, and manifest.
Lifecycle for a Small App.
By using the Sony Add-on SDK, an app can have nearly the same functionality as an Android™ activity, while running in a window on top of the currently running app. This gives a Small App several advantages compared to a widget. For example, you can design your Small App window with a custom background, title, and size. You can also show a custom view when the window is minimised. Unlike widgets, a Small App can handle all types of input events, such as text input and pinch to zoom.
IR Remote on Xperia Tablet Z
Xperia™ Tablet Z running the Remote Control App.
How the IR Remote sensor works
The Universal IR Remote app available in Xperia ZLSony Tablet SXperia Tablet S, and Xperia Tablet Zallows users to control the TV and other Sony devices – as well  as products from other manufacturers – directly from their Xperia™ device.
The functionality of the IR remote sensor in the Xperia™ ZL and Sony tablets relies upon an IR remote API embedded in the IR Remote Control application. The Sony Add-on SDK enables the IR remote API to transmit remote control commands. The model below illustrates how an app can access the IR remote API. When you create an app for the IR remote sensor, the app will have the same access level as the Sony Remote Control application on the device, through the IR remote API, but without the need for low level communication with the infrared element.
IR Remote architecture
IR remote API flow.
The IR remote API supports the following IR functions:
  • Transmission of IR remote control signals.
  • Acquire a device list registered on Sony’s IR remote control app
  • Acquire device info.
  • Acquire device key.
  • Invoke the device registration screen of Sony’s IR remote control app.
Several more details and conditions apply, please the Sony Add-on SDK documentation kit for more information.
Start developing Small Apps & IR remote sensor-enabled apps  – install the Sony Add-on SDKTo start developing a Small App or IR remote sensor-enabled app, first install the Sony Add-on SDK, download the Sony Add-on SDK documentation kit and follow the instructions in the Small App or IR remote sensor documentation.
If you’re developing a Small App, you’ll also find a Hello World code example included as part of the Sony Add-on SDK installation. This code example provides basic code with which to create a Small App, plus code used to configure the size and layout options. You can get more information from our blog post on how to add Small App support to your app.
If you’re developing an IR remote app, you’ll find a code example and API references in the documentation kit. Or you can get more information from our blog post on how to develop apps using the IR remote API.
Use the Sony Add-on SDK emulator
In the Sony Add-on SDK, there is also an emulator that will allow to you launch a Small App from the list of available apps, so that you can test the Small App you have created.  For IR-enabled all, you will have to test on actual IR-enabled hardware. The IR functionality cannot be simulated in the Sony Add-on SDK emulator.
Find answers & post developer questionsIf you have any questions while you’re developing, check out the Troubleshooting sections in the Sony Add-on SDK documentation kit. If you have any questions the installation or emulator setup, there is also a Troubleshooting section on the Install page. 
If you can’t find an answer to your question, you can post Sony Add-on SDK developer related questions on theStack Overflow forum. We have a team of Sony developers that constantly monitors, contributes and replies to questions regarding our products and tools at Stack Overflow. This way, your question and our answer can be shared, viewed and used by many people.
So if you have a question, just make sure you add the term “Sony” to your question. Then we should be able to catch your question, and support you in your development!
*Small Apps functionality is available in all software versions available for these listed devices, but please note that Small Apps developed with the Sony Add-on SDK will only show up and work with devices upgraded to Android 4.1 (Jelly Bean).

No comments:

Powered by Blogger.