语言

Menu
Sites
Language
How do I add a wearable web widget to an existing web application?

I created a Web Widget that I want to push to my watch. When I connect my watch, it says that my watch doesn't support that kind of project. So, I am trying to bundle my Widget with a Web Application. I have successfully pushed Web Applications to my watch. I followed the steps here: https://developer.tizen.org/development/getting-started/web-application/application-development-process#multi

<!--break-->

My Web Widget is called JohnDoeWidget. The Web Application I bundled it with is called BuddyUI (It's the sample app). In the Tizen IDE, in the Project Explorer, it says "JohnDoeWidget [With BuddyUI] wearable-2.3.2". So I think I did that part correctly. 

<!--break-->

In the BuddyUI config.xml, in the Tizen (or advanced) menu, the Web Widget section has nothing in it. Surely this is the problem! However, I cannot figure out how to add the JohnDoeWidget to this. I tried manually editing the config.xml file, but then when it builds, it says "JohnDoeWidget exists with a different web widget project.". The BuddyUI config.xml looks like this

<!--break-->

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="(removing link)" xmlns:tizen="(removing link)" id="(removing link)" version="1.0.0" viewmodes="maximized">
    <tizen:application id="yUnJzQvDKJ.BuddyUI" package="yUnJzQvDKJ" required_version="2.3"/>
    <content src="index.html"/>
    <feature name="(removing link)/feature/screen.size.normal"/>
    <icon src="icon.png"/>
    <name>BuddyUI</name>
    <tizen:privilege name=(removing link)/privilege/application.launch"/>
    <tizen:profile name="wearable"/>
    <tizen:setting hwkey-event="enable"/>
</widget>

<!--break-->

What I tried to do was change it to this, with no luck.

<!--break-->

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="(removing link)" xmlns:tizen="(removing link)" id="(removing link)" version="1.0.0" viewmodes="maximized">
    <tizen:application id="yUnJzQvDKJ.BuddyUI" package="yUnJzQvDKJ" required_version="2.3"/>
    <content src="index.html"/>
    <feature name="(removing link)/feature/screen.size.normal"/>
    <icon src="icon.png"/>
    <name>BuddyUI</name>
    <tizen:privilege name="(removing link)/privilege/application.launch"/>
    <tizen:profile name="wearable"/>
    <tizen:setting hwkey-event="enable"/>
    <tizen:app-widget id="Fttrlmw6YQ.JohnDoeWidget.JohnDoeWidget" primary="true">
        <tizen:widget-label>Hello Web Widget!</tizen:widget-label>
        <tizen:widget-content src="index.html">
            <tizen:widget-size preview="preview.png">2x2</tizen:widget-size>
        </tizen:widget-content>
    </tizen:app-widget>
</widget>

<!--break-->

I also tried changing the app-widget id to "yUnJzQvDKJ.BuddyUI.JohnDoeWidget" but that gives the error "JohnDoeWidget exists with a different web widget project.". 

<!--break-->

How do I add a widget to an existing web application?

<!--break-->

 

响应

1 回复