DISTRIBUTION OF TIZEN-BASED WATCH APPS HAS BEEN DISCONTINUED

Configuring Galaxy Watch Application

If you want to make a host-side provider for a Galaxy Watch Aapplication, 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.

Uses-Permission Description
com.samsung.wmanager.APP (Deprecated) Permission for the Wearable application
com.samsung.WATCH_APP_TYPE.Companion Permission to enable host devices to recognize companion applications
com.samsung.WATCH_APP_TYPE.Linked_Follower (Deprecated) Permission to enable host devices to recognize Linked applications
com.samsung.WATCH_APP_TYPE.Integrated (Deprecated) Permission to enable host devices to recognize Integrated applications

Table 1: uses-permission

If your application is a host-side application, add the Galaxy Watch application information using metadata tags to the AndroidManifest.xml. Galaxy Wearable uses this information to notify users if the Galaxy Watch 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 Galaxy Watch app packagename
gear_app_min_version Describes the minimum version of the Galaxy Watch app

Table 2: Meta Data

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

1. config.xml

<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/mywebapp"  version="1.0.0" viewmodes="maximized" >
<tizen:application id="vkwtzg6C9j.mywebapp" package="vkwtzg6C9j" required_version="2.3.1"/>

2. tizen-manifest.xml

<manifest package="org.tizen.hellonativeapp" type="tpk" version="1.0.0">

Compatibility between Galaxy Watch 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 Galaxy Watch application. In this case, specify the minimum version of the Galaxy Watch application. If this tag is specified and the version of installed Galaxy Watch application is lower, the Galaxy Watch application must be updated to launch. Therefore, in general cases, it is not recommended to specify gear_app_min_version.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.samsung.android.app.watchmanager"
android:versionCode="1"
android:versionName="1.0" >
	<uses-sdk
			android:minSdkVersion="14"
			android:targetSdkVersion="17" />
	<uses-permission android:name="com.samsung.WATCH_APP_TYPE.Companion"/>
	<application>
		<activity>
			…
		</activity>
		<meta-data
				android:name=" gear_app_packagename "
				android:value=" abcde12345 "/>
		<meta-data
				android:name=" gear_app_min_version "
				android:value="2.0.0"/>
		<meta-data
				android:name="GearAppType"
				android:value="wgt"/> // "wgt" or "tpk"
	</application>
</manifest>

If you want to make a Galaxy Watch 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. Galaxy Wearable 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.

  • master_app_min_version

  • master_app_auto_uninstallation

meta-data Description
master_app_name Describes the Galaxy Watch app packagename
master_app_packagename Describes the host-side app package name
master_app_min_version Describes the minimum version of the host-side app
master_app_samsungapps_deeplink
master_app_playstore_deeplink
master_app_3rd_url_deeplink

Describes the market deep link of the host-side app
master_app_auto_uninstallation Describes whether the host-side app is automatically uninstalled upon uninstalling the Galaxy Watch app

In the companion type, both the Galaxy Watch 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 Galaxy Watch 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 Galaxy Watch application, then Galaxy Watch 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 Galaxy Watch 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 Galaxy Watch application and the host-side application is uninstalled, the Galaxy Watch 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 Galaxy Watch 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.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mytest"
android:versionCode="1"
android:versionName="1.0" >

This information of host-side application is specified only when the Galaxy Watch application doesn’t have the logic to check the host-side application status. Galaxy Wearable 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 Galaxy Watch 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 Galaxy Watch application. Otherwise, this tag should not be specified.

1. config.xml

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/WebBasic" version="1.0.0" viewmodes="maximized">
	<tizen:application id="2XOqz8dX8P.WebBasic" package="2XOqz8dX8P" required_version="2.3.1"/>
	<content src="index.html"/>
	<feature name="http://tizen.org/feature/screen.size.all"/>
	<icon src="icon.png"/>
	<tizen:metadata key="master_app_name" value="master App"/>
	<tizen:metadata key="master_app_packagename" value="com.example.masterapp"/>
	<tizen:metadata key="master_app_min_version" value="10"/>
	<tizen:metadata key="master_app_samsungapps_deeplink" value="Samsungapps deeplink URL"/>
	<tizen:metadata key="master_app_playstore_deeplink" value="playstore deeplink URL"/>
	<tizen:metadata key="master_app_3rd_url_deeplink" value="3rd url deeplink URL"/>
	<tizen:metadata key="master_app_auto_uninstallation" value="yes"/>
	<name>WebBasic</name>
	<tizen:profile name="wearable"/<
	<tizen:setting background-support="disable" encryption="disable" hwkey-event="enable"/>
</widget>

2. tizen-manifest.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3.1" package="org.tizen.coreui" version="1.0.0">

<profile name="wearable"/>
<ui-application appid="org.tizen.coreui" exec="coreui" multiple="false" nodisplay="false" taskmanage="true" type="capp">
	<label>coreui</label>
	<icon>coreui.png</icon>
	<metadata key="master_app_name" value="master App"/>
	<metadata key="master_app_packagename" value="com.example.masterapp"/>
	<metadata key="master_app_min_version" value="30"/>
	<metadata key="master_app_samsungapps_deeplink" value="[Samsungapps deeplink URL]"/>
	<metadata key="master_app_playstore_deeplink" value="[playstore deeplink URL]"/>
	<metadata key="master_app_3rd_url_deeplink" value="[3rd url deeplink URL]"/>
	<metadata key="master_app_auto_uninstallation" value="yes"/>
</ui-application>
<privileges>
	<privilege>http://tizen.org/privilege/systemsettings</privilege>
	<privileges>

		<manifest>