1. Plugin overview
An HTML5 plugin section will appear as the other sections in your app:
- It will be displayed between the Navigation Bar and the bottom of the screen, or the TabBar, according to the navigation mode you choosed
- By delegating its internal navigation to the app, the plugin will benefit of the same transition effects (horizontal push, modal) than the other sections
- By delegating its cache management and its network interactions, the plugin will be available offline
- It will also have the capability to interact with the rest of the app (send and receive messages)
2. Content of the plugin bundle
Your plugin can contain several types of files:
- An index.html file (mandatory) that will be the plugin's main page
- Other HTML files (optionnal) that would be the plugin's other pages
- Other resource files (optionnal), like images, CSS stylesheets, JS librairies, etc.
All the dependancies to the plugin files have to be made in the current directory (./).
3. How to send and receive message to and from the app
There are two types of interactions possible between your plugin and your Apollo Apps app.
Messages sent by the plugin to the app (Plugin => Native)
The plugin can send messages to the app, by starting a navigation to documented URL schemes. These methods can be used to manage the internal or external navigation of the plugin, to manage the network interactions, and other methods.
Messages sent by the app to the plugin (Native => Plugin)
The implementation process of the methods and callbacks of the Apollo Apps Plugin API is described in the article Plugin API Overview.
The methods available to discuss with the app (navigation, download, etc.) can be called directly by sending HTTP request to the app.
In this documentation, you'll find the method prototypes in the HTTP requests version, and their equivalent in GBJSToolKit.