Offline HTML: Difference between revisions
No edit summary |
|||
| Line 31: | Line 31: | ||
The latest version is available on GitHub: https://github.com/Resconet/JSBridge | The latest version is available on GitHub: https://github.com/Resconet/JSBridge | ||
== Communication with external applications == | |||
In some cases you might want to start a process in Resco mobile CRM app, but continue in a third-party application. For this, you need to be able to | |||
* Send data from Resco app to the third-party app | |||
* Receive reply (data) from third-party app and process it in Resco app. | |||
We support this kind off inter-application communication via URL schemes. The third-party application also has to support URL schemes to use this kind of data exchange. | |||
=== Example of the URL scheme === | |||
To open a specific record in Resco Mobile CRM app from other external application, it is possible to use this URL scheme link: | |||
mobilecrm://open?{entity_logicalname};{entity_id} | |||
Where '''{entity_logicalname}''' represents the entity name (case sensitive) and '''{entity_id}''' represents the GUID of the record itself. | |||
An alternative URL for Android (which works from e.g. email apps) is: | |||
<nowiki>http://resco.net/schemes/mobilecrm?{entity_logicalname};{entity_id}</nowiki> | |||
{{Note|The record that the URL scheme is pointing to must be available in Mobile CRM app’s offline database.}} | |||
== See also == | == See also == | ||
Revision as of 10:45, 16 July 2019
Woodford allows to configure a great wealth of features in Resco mobile CRM apps. All this can be performed without coding. However, some advanced features simply cannot be accomplished without some code. This is where offline HTML can be used.
Offline HTML is a flexible way to extend Resco mobile apps. You can add specially crafted HTML pages to your mobile project and these can be used for online and offline. When we say HTML pages, this is not restricted to .html files! You can also include JavaScript files, cascading style sheets, images, etc.
The most common use cases include:
- Extending the user interface of mobile CRM apps
- Adding business logic or complex form validation
- Replacing the app's UI completely
Inline frame
The HTML pages are displayed directly in the application, in inline frames. An inline frame, or IFrame, is a dedicated window of the standard web browser available on your device:
- iOS - Safari
- Android - Chrome
- Windows - Internet Explorer
The inline frame can be placed:
- as a tab on a Form
- as an item on the Home screen
- as a Home screen replacement
- complete replacement of the app's user interface
Resco JavaScript Bridge
Resco JavaScript Bridge, or JSBridge.js, is a component provided by Resco that allows the scripts in the HTML frame to interact with Resco mobile apps. You can interact with
- user interface layer: access the forms, perform validation, etc.
- data layer: access entities and records, create / modify records, query data
- miscellaneous: access application, its configuration, write files, modify metadata
You have to include JSBridge.js in your HTML.
The latest version is available on GitHub: https://github.com/Resconet/JSBridge
Communication with external applications
In some cases you might want to start a process in Resco mobile CRM app, but continue in a third-party application. For this, you need to be able to
- Send data from Resco app to the third-party app
- Receive reply (data) from third-party app and process it in Resco app.
We support this kind off inter-application communication via URL schemes. The third-party application also has to support URL schemes to use this kind of data exchange.
Example of the URL scheme
To open a specific record in Resco Mobile CRM app from other external application, it is possible to use this URL scheme link:
mobilecrm://open?{entity_logicalname};{entity_id}
Where {entity_logicalname} represents the entity name (case sensitive) and {entity_id} represents the GUID of the record itself.
An alternative URL for Android (which works from e.g. email apps) is:
http://resco.net/schemes/mobilecrm?{entity_logicalname};{entity_id}
| Note | The record that the URL scheme is pointing to must be available in Mobile CRM app’s offline database. |