Trigger.io

Trigger.io Forge Documentation

Important

This documentation is deprecated, and only kept here to support users of browser extension APIs. If you are using Trigger.io for iOS or Android, see https://trigger.io/docs/.

Weather App Conversion

One of the key benefits of using Forge is being able to generate for multiple platforms from the same source code. Converting the Weather App from Chrome to mobile and vice-versa is as simple as making a few tweaks to the configuration file.

Chrome to Mobile

If you did the Weather App tutorial using a Chrome extension you do not need to make any modifications at all. Simply go through the Mobile getting started section which will show you how to set up the development environment. Once you have the JDK, SDK and AVD configured simply follow the directions on how to build and run the app.

Mobile to Chrome

The code used for building the Chrome extension will be identical, but we just need a way to display index.html.

One option is to have it show up as a popup that appears when a user clicks a toolbar button. To configure this, simply add the following button configuration to the modules section in config.json directory:

"button": {
    "default_popup": "index.html"
},
  • the default_popup setting points to the HTML file that should be displayed when the toolbar button is clicked

If you want to know more about the configuration file, see the Config File Reference.

Now just build and load the extension to see the Weather Demo in Chrome.

Extensions and API

This has been only a simple demo of what Forge is capable of. You can try extending the weather app with your own custom functionality. Here are a few suggestions to get you going. Also take a look at the API documentation to see what type of functionality is provided by Forge.