简体   繁体   English

如何为我的智能手表使用Tizen Web应用程序打包Tizen Web小部件?

[英]How do I package a Tizen Web Widget with a Tizen Web Application for my smartwatch?

I created a Web Widget that I want to push to my watch. 我创建了一个我想要推送到手表的Web小部件。 The Tizen Documenation says a widget cannot be deployed standalone. Tizen Documenation表示无法单独部署小部件。 So, I am trying to bundle my Widget with a Web Application. 所以,我试图将我的Widget与Web应用程序捆绑在一起。 I have successfully pushed the Web Application to my watch, but I can't get the widget to go with it. 我已成功将Web应用程序推送到我的手表,但我无法使用它来使用它。 I tried following the steps here: https://developer.tizen.org/development/getting-started/web-application/application-development-process#multi 我尝试按照这里的步骤操作: https//developer.tizen.org/development/getting-started/web-application/application-development-process#multi

My Web Widget is called JohnDoeWidget. 我的Web小部件称为JohnDoeWidget。 The Web Application I bundled it with is called BuddyUI (It's the sample app). 我捆绑的Web应用程序叫做BuddyUI(它是示例应用程序)。 In the Tizen IDE, in the Project Explorer, it says "JohnDoeWidget [With BuddyUI] wearable-2.3.2". 在Tizen IDE中,在Project Explorer中,它显示“JohnDoeWidget [With BuddyUI] wearable-2.3.2”。 So I think I did that part correctly. 所以我认为我正确地做了那个部分。 When I push BuddyUI to my phone, there is no widget with it, though. 当我将BuddyUI推送到我的手机时,没有它的小部件。

In the BuddyUI config.xml, in the Tizen (or advanced) menu, the Web Widget section has nothing in it. 在BuddyUI config.xml中,在Tizen(或高级)菜单中,Web Widget部分中没有任何内容。 Surely this is the problem! 当然这是问题所在! However, I cannot figure out how to add the JohnDoeWidget to this. 但是,我无法弄清楚如何将JohnDoeWidget添加到此。 I tried manually editing the config.xml file, but then when it builds, it says "JohnDoeWidget exists with a different web widget project.". 我尝试手动编辑config.xml文件,但是当它构建时,它说“JohnDoeWidget与不同的Web小部件项目存在。”。 The BuddyUI config.xml looks like this BuddyUI config.xml看起来像这样

<?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>

What I tried to do was change it to this, with no luck. 我试图做的是改变它,没有运气。

<?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>

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.". 我还尝试将app-widget id更改为yUnJzQvDKJ.BuddyUI.JohnDoeWidget但这会产生错误“JohnDoeWidget存在于不同的Web小部件项目中”。

How do I add a widget to an existing web application? 如何将小部件添加到现有Web应用程序?

-- Edit: I also tried the following: - 编辑:我也尝试了以下内容:

  • I created a new Web Application 我创建了一个新的Web应用程序
  • Bundled a new web widget with it 用它捆绑一个新的Web小部件
  • Pushed it to my watch. 把它推到我的手表上。 The app showed up on my watch, but the widget did not. 该应用程序出现在我的手表上,但小部件没有。

Web widget is not support under Gear S2. Gear S2下不支持Web小部件。 (I can't be sure about S3.) (我无法确定S3。)
Look at this document . 看看这个文件

Web widget is supported from 2.3.2. 2.3.2支持Web小部件。 but but gear s2 is 2.3.1. 但是齿轮s2是2.3.1。

I don't know what is your smartwatch but I know every samsung smart watchs have OS under tizen 2.3.1. 我不知道你的智能手表是什么,但我知道每一款三星智能手表都有触控2.3.1的操作系统。

I check my solution in 2.3.2 emulator on Tizen Studio latest version. 我在Tizen Studio最新版本的2.3.2模拟器中查看我的解决方案。 and make sure it is works on the emulator. 并确保它在模拟器上工作。
But it is not works on my samsung gear s2. 但它不适用于我的三星齿轮s2。

So it is right operation "web widget" is not working on real targets in current time. 所以这是正确的操作“web widget”在当前时间不适用于真正的目标。


Don't edit config.xml to add a widget. 不要编辑config.xml来添加小部件。

After you check the widgets for adding a your project in package multi menu in link , Tizen Studio change your config.xml to add widget. 您检查,在包多菜单添加一个项目中的小部件后链接 ,Tizen工作室更改config.xml中添加小部件。
You can see it in unzipped BuddyUI.wgt 你可以在解压缩的BuddyUI.wgt中看到它

Your error seems to be happened because the duplicated widget tag. 您的错误似乎发生了,因为重复的小部件标记。
I think auto generated config.xml after you build that may have two same app-widget tag. 我认为在构建之后自动生成的config.xml可能有两个相同的app-widget标记。

Just do following process and build UI project. 只需执行以下流程并构建UI项目。

In the Web UI application project context menu, select Properties > Tizen Studio > Package > Multi.
Select the check box for the web widget applications, and click OK.

You can check and see how Tizen studio make it. 您可以查看并查看Tizen工作室如何制作它。 just unzip wgt file. 只需解压缩wgt文件。

I create basic UI and TestWidget1 and merge it one wgt file with upper process. 我创建了基本的UI和TestWidget1,并将一个wgt文件与上层进程合并。 it show following tree of files after unzip. 解压缩后会显示以下文件树。

├── author-signature.xml
├── config.xml
├── css
│   └── style.css
├── icon.png
├── index.html
├── js
│   └── main.js
├── signature1.xml
└── widget
    └── TestWidget1
        ├── css
        │   └── style.css
        ├── icon.png
        ├── index.html
        ├── js
        │   └── main.js
        └── preview.png

And also has following config.xml 并且还有以下config.xml

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/BasicUI2" version="1.0.0" viewmodes="maximized">
    <tizen:app-widget id="LRVQWwNeO1.BasicUI2.TestWidget1" primary="true">
        <tizen:widget-label>Hello Web Widget!</tizen:widget-label>
        <tizen:widget-content src="widget/TestWidget1/index.html">
            <tizen:widget-size preview="widget/TestWidget1/preview.png">2x2</tizen:widget-size>
        </tizen:widget-content>
    </tizen:app-widget>
    <tizen:application id="LRVQWwNeO1.BasicUI2" package="LRVQWwNeO1" required_version="2.3.2"/>
    <content src="index.html"/>
    <feature name="http://tizen.org/feature/screen.size.all"/>
    <icon src="icon.png"/>
    <name>BasicUI2</name>
    <tizen:profile name="wearable"/>
</widget>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 JavaScript 在 Tizen Web Widget 中不起作用 - JavaScript not working in Tizen Web Widget Tizen可穿戴式Web窗口小部件可见性更改和调试 - Tizen Wearable Web Widget visibilityChange and Debug 如何创建Web应用程序的小部件 - how do I create a widget of my web application Tizen Native:如何只有一个Widget实例,而又不允许用户创建更多的Widget实例? - Tizen Native: How can I have only one Widget Instance and not allow the user to create more? 如何控制谁使用我的Web小部件 - How to control who uses my web widget 刚开始使用Silverlight,我可以从主Web应用程序页面向我的嵌入式silverlight“小部件”发送数据吗? - Just started with Silverlight, can I send data to my embeded silverlight “widget” from main web application page? 我想在其他网站中使用我的 angular 4 应用程序作为小部件 - 无论网站语言 - - i want use my angular 4 application as widget in other web sites - whatever websites language - 如何为我的网页提供HTML嵌入式代码? - How do I provide an HTML embedded code for my web page? 如何为我的网站用户创建一个Web小部件,以便在他们的博客上插入? - How to create a web widget for my website users to insert on their blog? 如何保护从第三方网站嵌入的我的 web 小部件 - How to secure my web widget embedded from third party website
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM