Application extensibility for smart device control
Features described herein pertain to extending the functionality of an application executing on an electronic device. A device trait specification associated with a smart device can be used to generate an application extension template for defining a layout of a graphical user interface page of the application and binding at least one device trait of the set of device traits to the application. An application extension can be generated based on the application extension template being populated with layout defining values and binding values. The application extension can be provided to the application. The application extension can cause the graphical user interface page of the application to be displayed on a display of the electronic device with the defined layout and elements bound to the layout and configured to cause the smart device to be controlled based on the device traits.
1 . A method for extending functionality of an application executing on an electronic device, the method comprising:
accessing an extension container of the application, the extension container comprising a set of instructions including layout defining values configured to define a layout of a graphical user interface of the application and binding values configured to link device traits to the graphical user interface, wherein each device trait of the device traits corresponds to a function of a smart device that is in wireless communication with the electronic device, wherein the layout comprises a plurality of user interface elements corresponding to one or more of the device traits;
dynamically generating, via a dynamic layout engine of the application, the graphical user interface by arranging the plurality of user interface elements based on the set of instructions; and
causing the graphical user interface of the application to be displayed on a display of the electronic device with the layout.
2 . The method of claim 1 , wherein the plurality of user interface elements that are configured to cause the smart device to be controlled based on the corresponding device traits.
3 . The method of claim 2 , wherein the binding values are configured to link the device traits to the plurality of user interface elements.
4 . The method of claim 1 , wherein prior to displaying the graphical user interface to the electronic device, the method further comprises:
receiving a request for an application extension from the electronic device.
5 . The method of claim 1 , wherein the set of instructions is populated with the layout defining values and the binding values based on input received by a user.
6 . The method of claim 1 , wherein the device traits are included in a device trait specification that is associated with the smart device, wherein the device traits correspond to at least one of: thermostat traits, presence detecting traits, security traits, and lighting traits.
7 . The method of claim 1 , wherein the extension container comprises instructions formatted in a programming language.
8 . The method of claim 1 , wherein the plurality of user interface elements is stored in a library of user interface elements in the application, wherein the dynamic layout engine executes the set of instructions to select the user interface elements from the library.
9 . The method of claim 8 , wherein the dynamic layout engine is configured to decode and interpret the set of instructions in the extension container to select the user interface elements from the library.
10 . A system comprising:
a processing system; and
at least one computer-readable medium storing instructions which, when executed by the processing system, cause the system to perform operations comprising:
accessing an extension container of the application, the extension container comprising with a set of instructions including layout defining values configured to define a layout of a graphical user interface of an application executing on an electronic device and binding values configured to link device traits to the graphical user interface, wherein each device trait of the device traits corresponds to a function of a smart device that is in wireless communication with the electronic device, wherein the layout comprises a plurality of user interface elements corresponding to one or more of the device traits;
dynamically generating, via a dynamic layout engine of the application, the graphical user interface by arranging the plurality of user interface elements based on the set of instructions; and
causing the graphical user interface of the application to be displayed on a display of the electronic device with the layout.
11 . The system of claim 10 , wherein the layout comprises a plurality of user interface elements are configured to cause the smart device to be controlled based on the corresponding device traits.
12 . The system of claim 11 , wherein the binding values are configured to link the device traits to the plurality of user interface elements.
13 . The system of claim 10 , wherein prior to providing the graphical user interface to the electronic device, the operations further comprising:
receiving a request for an application extension from the electronic device.
14 . The system of claim 10 , wherein the set of instructions is populated with the layout defining values and the binding values based on input received by a user.
15 . The system of claim 10 , wherein the device traits are included in a device trait specification that is associated with the smart device, wherein the device traits correspond to at least one of: thermostat traits, presence detecting traits, security traits, and lighting traits.
16 . The system of claim 10 , wherein the extension container comprises instructions formatted in a programming language.
17 . One or more non-transitory computer-readable media storing instructions which, when executed by at least one processing system, cause a system to perform operations comprising:
accessing an extension container, the extension container comprising with a set of instructions including layout defining values configured to define a layout of a graphical user interface of an application executing on an electronic device and binding values configured to link device traits to the graphical user interface, wherein each device trait of the device traits corresponds to a function of a smart device that is in wireless communication with the electronic device, wherein the layout comprises a plurality of user interface elements corresponding to one or more of the device traits;
dynamically generating, via a dynamic layout engine of the application, the graphical user interface by arranging the plurality of user interface elements based on the set of instructions; and
causing the graphical user interface of the application to be displayed on a display of the electronic device with the layout.
18 . The one or more non-transitory computer-readable media of claim 17 , wherein the plurality of user interface elements are configured to cause the smart device to be controlled based on the corresponding device traits.
19 . The one or more non-transitory computer-readable media of claim 18 , wherein the binding values are configured to link the device traits to the plurality of user interface elements.
20 . The one or more non-transitory computer-readable media of claim 17 , wherein prior to providing the graphical user interface to the electronic device, the operations further comprising:
receiving a request for an application extension from the electronic device.