Alljoyn - control serivice framework dynamic flow

asked 2014-06-24 08:56:13 -0700

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.


I was just starting up to Alljoyn and wanted create controllee which can generate widgets dynamically rather than statically. I came across sample XMLs but they don't specify anything which is mentioned in the interface document (i.e signals or metaDataChanged or something in that line) for the control framework. Here is the example which makes my question clear. Lets say I have lights to control and I should be able to create turn on and off widgets only when i press add lights button in the controller in that way add light will go and search how many lights available to be controlled and then controlle should send that for example i have two lights available and then their widget should be visible. Do you know how can I write XML for the same?

Thanks in advance! Best Regards, Dipen Patel

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-06-26 09:32:19 -0700

mitchw gravatar image

The short answer is that you can't dynamically create controls (widgets) at run time.

What you can do is use the XML to design widgets for the different objects/devices that you're planning to expose. Then, to make these widgets 'exposed' by the controlee on demand, you can either:

  1. Use the flag in the widget properties to enable/disable the widget. If it is disabled, then the client side of the Control Panel service will either not render the widget at all, or display it as 'grayed out', depending on the rendering layer implementation
  2. In the Control Panel service code that defines the widget, you can flag the widget as not introspectable, and then the client side of the Control Panel service will not retrieve the widget at all.
edit flag offensive delete publish link more


Hi Mitchw, Thanks for the reply. But in that case dont you think that is very severe limitation. Consider i have this house and i dont know how many light available and only way to know them is to get their status over some transport layer say zigbee or wifi or something else, depending that we can create control panels to turn them off and on from android device or something. If we fix this statically then we are just limited by the widgets we added in the xml file i.e. if i add 5 lights in xml with action widgets then i can not control more than 5 even if 7 lights available to be controlled. Do you know if is there any way available beside that you mentioned as if you think it is also different kind of static way itself? Will there be this feature added ...(more)

pateldipen1984 ( 2014-06-26 12:18:53 -0700 )edit

Hello Dipen Patel , did you find a solution for this problem? for me i want to explore the house and get the list of devices such as Lights, AC, Sensors, ... and then command them using an android application ( Control Panel Browser) first of all i want to explore and get list of devices then i want to create a graphical interface using Android, so i want to get information from server seperatly. Thx

mahdi_baklouti ( 2015-02-25 05:41:49 -0700 )edit
Login/Signup to Answer

Question Tools



Asked: 2014-06-24 08:56:13 -0700

Seen: 200 times

Last updated: Jun 26 '14