0

I want to make a Tizen Wearable (2.3.1) native widget application and a Tizen Web UI application in same package.

Is it possible?

If possible, how to update native widget instances in web UI application? In other words, what is widget_service_trigger_update() API in web?

Thanks!

Iqbal hossain
  • 1,778
  • 3
  • 17
  • 24
msalt.net
  • 106
  • 7

2 Answers2

0

As far i know, you not possible to make native widget application and web UI application in same package. You have to develop two separate apps. One is native widget and another is web UI. But you can acquaint each other apps by their app id. For example, In Web App,

var widgetAppName = "XXXXXXXXX.weatherwidget";
if (reqAppControl && reqAppControl.callerAppId && reqAppControl.callerAppId == widgetAppName) {
        console.log("Launched by the widget.");
        if (reqAppControl.appControl.data[0].key == "city") {
            console.log("city from widget: " + reqAppControl.appControl.data[0].value);
            readfile(reqAppControl.appControl.data[0].value);   // Show latest data with received city
        }
    }

In web app i acquainted the native widget by its app id.

From native widget, you have to set the app id of web ui app like this,

app_control_set_app_id(control, "YYYYYYY.WeatherWebApp");

You can find this sample app from this link. Download the Sample app and find the weather app for your purposes from this path

Samples/Accessory/Samples(Web)/Weather/Consumer(Tizen)

Hope my idea will help you.

Iqbal hossain
  • 1,778
  • 3
  • 17
  • 24
  • Thanks! I know that I can use app_control between native widget and web UI app. Already I made codes about call web UI app from native widget app. But, as I said, I don't know native widget app update from web UI App. I want it. – msalt.net Nov 07 '16 at 22:59
  • Not yet. I am trying to find a solution. Finally, I have a workaround solution, making a native service application to transfer app_control(update) in mind. – msalt.net Nov 08 '16 at 05:50
0

I heard that 2.3.1 web api not support 'widget_service_trigger_update()'. It support from 2.3.2.

So, I finally solved it by to add a native service application for just this problem. The sevice application receive app control from web app and then send widget_service_trigger_update() to native widget application for a specific widget instance.

Good Luck.

** When use 'widget_service_trigger_update()', applications have to be packaged together for permission issue. Link

Community
  • 1
  • 1
msalt.net
  • 106
  • 7