Configuring Gear Application

If you want to make a host-side provider for a Gear application, you must add necessary permissions on your Android Manifest file. To enable host devices to recognize companion applications, add the following permission to your general host Android Manifest file (AndroidManifest.xml). If you are going to develop companion type application, you must not add the deprecated permission on your Android Manifest file because the types have been deprecated in companion type.

If your application is a host-side application, add the Gear application information using metadata tags to the AndroidManifest.xml. Gear Manager uses this information to notify users if the Gear application is absent or is later uninstalled from the Host.

gear_app_min_version in AndroidManifest.xml doesn’t work with the Tizen 2.2.x devices(Gear 2, Gear 2 Neo and Gear S) and is supported only by Tizen 2.3.1 devices and up.

meta-data

Description

gear_app_packagename

Describes the Gear app packagename

gear_app_min_version

Describes the minimum version of the Gear app

Table 2: Meta Data

You can check the gear package name and version attribute from config.xml (web application) or tizen- manifest.xml(native application).

Compatibility between gear application and host-side application should be guaranteed in various versions. But if compatibility cannot be guaranteed, gear_app_min_version should be used.

Use gear_app_min_version tag only for exceptional cases when the host-side application has compatibility issue with the specific Gear application. In this case, specify the minimum version of the Gear application. If this tag is specified and the version of installed gear application is lower, the gear application must be updated to launch. Therefore, in general cases, it is not recommended to specify gear_app_min_version.

If you want to make a Gear application, you must provide config.xml for the web application or tizen- manifest.xml for the native application.

Add the host-side application information using metadata tags to the config.xml or tizen-manifest.xml. Gear Manager uses this information to notify users if the host-side application is absent or is later uninstalled from the Host.

Following two meta-data in config.xml or tizen-manifest.xml are not supported with the Tizen 2.2.x devices (Gear 2, Gear 2 Neo and Gear S) and are supported only by Tizen 2.3.1 devices and up.

In the companion type, both the Gear companion application and the host-side companion application could be installed in each routine. Therefore, it is always recommended to check the peer application at runtime. For example, users can uninstall the host-side application or users would not select to install the host-side application when deeplink which was specified by gear application works at installing time. Hence, it is always recommended to check the peer application’s installation and the version for the compatibility.

If the host-side application is not installed or the version of host-side application is lower than minimum version to work with the Gear application, then Gear application should indicate that installation or upgrade of the host-side application is needed.

From Tizen 2.3.1, meta-data have been introduced to support this mechanism. If the Gear application specifies peer package name and minimum version, Tizen platform transmit the deeplink to download the host-side application automatically in both installing and launching time.

But if you make the standalone application, you should not specify the meta-data below at all. If meta-data is specified in the Gear application and the host-side application is uninstalled, the gear application cannot be launched until host-side application is installed, showing popup to connect the deeplink.

In Tizen 2.2.x, master_app_packagename metadata makes a deeplink only at installation time. So the Gear application will make sure to check the host-side application at runtime.

You can check the master_app_packagename and master_app_min_version in the Android Manifest. For the master_app_min_version tag, android:versionCode value should be used, and not android:versionName.

This information of host-side application is specified only when the Gear application doesn’t have the logic to check the host-side application status. Gear Manager will use this information to notify users if the host-side application is needed to be installed or updated.

Use master_app_min_version tag only for exceptional cases when the Gear application has compatibility issue with the specific host-side application. In this case, specify the minimum version of the host-side application. If this tag is specified and the version of installed host-side application is lower, the host-side application must be updated to launch. Therefore, in general cases, it is not recommended to specify master_app_min_version.

When it comes to determining priorities in deeplinks, the topmost meta-data is first-served in config.xml or tizen- manifest.xml

Use master_app_auto_uninstallation tag only if you want to uninstall the host-side application automatically when uninstalling the Gear application. Otherwise, this tag should not be specified.