语言

Menu
Sites
Language
Bug: watch face does not display like a watch-face in clock list, but display like as application. How to fix it?

I have created a watch face (structure of a basic watch face was taken from standard type of wath face in Tizen IDE -  Basic Watch). This watch face has a following code:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="Digital Watch Application"/>
    <title>Digital Watch</title>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
</head>

<body id = "colour">
<div id = "fon">
    //HERE MY CODE//
    </div>
</body>

<script src="js/main.js"></script>
<script src="js/time.js"></script>
</html>

In file "main.js" (standard js-code for running fatch face)- following code - https://jsfiddle.net/m2e0j9sv/

But an app does not display like a watch-face in clock list, but display like as application. 

Testing of my watch face is in video https://youtu.be/6Ssp7h2bVsk   (testing my app begins from 23 second).

How to fix it?

 

 

 

响应

3 回复
Shaswati Saha

Hello,

Please add the line below in the config.xml file.

<tizen:category name="http://tizen.org/category/wearable_clock"/>

Thanks.

Lena Dragan

Thanks for unswer

But this line is alredy exist

Here my 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/Name" version="1.0.0" viewmodes="maximized">
    <tizen:application id="O2VvjaaX8E.Name" package="O2VvjaaX8E" required_version="2.2.1"/>
    <author email="email@gmail.com">Me</author>
    <tizen:category name="http://tizen.org/category/wearable_clock"/>
    <content src="index.html"/>
    <description xml:lang="en-gb">english</description>
    <description xml:lang="uk-ua">ukrainian</description>
    <description xml:lang="ru-ru">russian</description>
    <description>Animated watch-face for smart-watch</description>
    <feature name="http://tizen.org/feature/screen.size.all"/>
    <icon src="icon.png"/>
    <name>Name</name>
    <name xml:lang="en-gb">en</name>
    <name xml:lang="uk-ua">ua</name>
    <name xml:lang="ru-ru">ru</name>
    <tizen:privilege name="http://tizen.org/privilege/alarm"/>
    <tizen:privilege name="http://tizen.org/privilege/call"/>
    <tizen:privilege name="http://tizen.org/privilege/volume.set"/>
    <tizen:privilege name="http://tizen.org/privilege/power"/>
    <tizen:profile name="wearable"/>
    <tizen:setting background-support="disable" encryption="disable" hwkey-event="enable"/>
</widget>

 

 

Marco Buettner

For 2.2.1 use (

<tizen:category name="com.samsung.wmanager.WATCH_CLOCK" />

instead of

<tizen:category name="http://tizen.org/category/wearable_clock"/>

Source: https://developer.tizen.org/development/getting-started/web-application/creating-your-first-tizen-wearable-web-watch-application
Scroll down until "Building a Simple UI"