开发者

Widgets on Samsung Star/ Samsung Corby

开发者 https://www.devze.com 2022-12-15 05:53 出处:网络
I 开发者_开发问答just created a new widget by following a tutorial. I created a zip containing all files and renamed it to HelloWorld.wgt instead of HelloWorld.zip. I sent it to my samsung star/corby

I 开发者_开发问答just created a new widget by following a tutorial. I created a zip containing all files and renamed it to HelloWorld.wgt instead of HelloWorld.zip. I sent it to my samsung star/corby via data cable, but when I try to open the wgt file on my phone it says it can't open it, because it doesn't know the filetype. Is there a way to install widgets on a Samsung Star without using a webserver?

Thanks,

Rohit desai


Just create an HTML file like this:

<html>
<head>
  <title>Hello</title>
</head>

<body>
  <a href="YOUR_WIDGET_NAME_HERE.wgt">Install widget</a>
</body>
</html>

Put the HTML file in the same folder with your widget and open the file. Click on Install widget and you are done.

P.S.: If you don't want to modify the HTML file for every widget you want to install use this code:

<html>
<head>
  <title>Hello</title>
  <script>
     function download()
     {
        var widgetName = document.getElementById("widgetName");
        location.href = widgetName.value + ".wgt";
     }
  </script>
</head>

<body>
  <input type="text" name="widgetName" id="widgetName" />
  <input type="button" value="Install widget" onclick = "download()" />
</body>
</html>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号