|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||
See:
Description
| Interface Summary | |
|---|---|
| SmallAppWindow.OnWindowFocusChangeListener | Interface definition for a callback to be invoked when the window focus is changed. |
| SmallAppWindow.OnWindowStateChangeListener | Interface definition for a callback to be invoked when the state of a window is changed. |
| Class Summary | |
|---|---|
| SdkInfo | Information about the SDK. |
| SdkInfo.VERSION | Various version strings. |
| SmallApplication | SmallApplication class is the base class to implement each Small App. |
| SmallAppWindow | SmallAppWindow represents the window which renders the Small App content. |
| SmallAppWindow.Attributes | Attributes of a window. |
| Enum Summary | |
|---|---|
| SmallAppWindow.WindowState | A state of a window. |
Provides classes necessary to create "Small Apps".
In many cases, Android does not allow the user to use several applications at the same time
since it displays only one application in full-screen.
Small Apps Framework offers a system to run normal applications as well as a Small App which
is displayed in a small window.
Unlike a normal application, the Small App is shown in a small window. In addition, it allows
the user to decide its display position and size.
It enables the user to multitask, e.g. Playing video with a normal application and reading mail
with a Small App, as the Small App does not disturb a normal application.
Small Apps needs to be launched by Small Apps launcher. The device which supports Small Apps Framework has a launcher to activate Small Apps. The user can boot arbitrary Small Apps by the launcher.
Normally, Activity class is used to implement an application which has GUI. However, if you use SmallApplication class for implementation, you can launch the application as a Small Apps. SmallApplication class is the most important class to implement Small Apps and it has an interface which is similar to Activity class.
The Small App is minimized when it is moved to the edge if the screen. In this case, the minimized window displays the application icon. It shows not only icon but also an arbitrary view if you use SmallApplication.setMinimizedView(int). For example, you can display current date instead of the icon.
Each Small App implemented by SmallApplication class has SmallAppWindow. SmallAppWindow has interface to control the Small App window. the window size, attribute, background etc. with the class.
You must declare your Small Apps in the manifest file in order for it to be
accessible to the system.
To declare your Small Apps, open your manifest file and add an <service> element
as a child of the <application> element.
<service> element must have the attribute android:exported="true".
In addition this, you must add <uses-permission> element
and <uses-library> element
to use Small Apps feature.
Here is an example:
<manifest ...>
...
<uses-permission android:name="com.sony.smallapp.permission.SMALLAPP" />
...
<application ...>
...
<uses-library android:name="com.sony.smallapp.framework" />
...
<service android:exported="true">
<intent-filter>
<action android:name="com.sony.smallapp.intent.action.MAIN" />
<category android:name="com.sony.smallapp.intent.category.LAUNCHER" />
</intent-filter>
</service>
...
</manifest>
In <service> element, you must declare intent-filter like an example above.
<action> element is mandatory but you can drop <category>
element if your application should not be listed on Small Apps launcher.
If you want to add your Small Apps to an application that contains normal application or service
or widget, there is a difference in how you declare <uses-library> in the
manifest compared to when making a stand-alone Small Apps. This makes your app visible on devices
without Small Apps Framework.
<uses-permission android:name="com.sony.smallapp.permission.SMALLAPP" android:required="false" />
By setting the android:required flag to false, this code ensures that
the <uses-library> is not used to filter out your application for devices witch
do not have Small Apps Framework.
To enable to install your Small Apps from the device, which has Small Apps Framework, add the following line below at the end of your application's description when you distribute your application.
Small apps extension for Sony products
The devices which support Small Apps Framework use this description for the query to search Small Apps. This description makes it easier for users to find and install your Small Apps.
|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||