Appcan Widget plugin extension mechanism

Source: Internet
Author: User

the appcan widget plugin extension mechanism , which is generated by the Appcan platform, can be understood as a widget package (that is, the ' phone ' folder that is seen in the IDE creation project), and a Appcan platform middleware. Usually, an application is composed of a widget+appcan, then, there is no possibility to say ' n Widget+appcan ' mechanism, promise is affirmative, this is the widget plugin mechanism, is an enhanced extension mechanism for the main widget and the common widget, which can be encapsulated into a separate widget package with a specific function and stored under plugin, and then invoked through the JS extension interface for functional expansion purposes. We call the widget in ' 1 Widget+appcan ' as the ' main widget ', while the other ' n-1 ' widgets exist in the ' plugin ' directory of the main widget.


The widget plug-in package exists under the plugin folder under the current main widget, followed by the widget package name, with the plugin widget naming ' appId ' as the folder name (e.g. ' 10031466 '). The directory structure inside the plugin widget is similar to the main widget (except for the ' plugin ' directory, which does not have a two-level plugin widget in the plugin widget).


Plugin folder: Store plugin widget package;

  plug-in calls:

Startwidget interface

You can implement data transfer between widgets and widgets, and register callback functions; "Reference plugin API"

Finishwidget interface

The parameter turns off the widget plug-in to the data that called the widget, responding exactly to the callback method in the Startwidget interface "reference plug-in API"

  Other interfaces:

All interfaces of the platform can be called, and if there is a call to the data storage interface for file reading, writing, or photographing, the location of the data store is consistent with the data storage location of the widget that invokes the plug-in.

Appcan plugin address: http://plugin.appcan.cn/

Appcan Widget plugin extension mechanism

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.