First Use Guide

Overview

svyPhonegap is a service to provide native mobile functionality from a Servoy application. This guide will help you integrate and build your first mobile app using the service.

Getting Started

Once you've gotten your main Servoy solution created, install the Phonegap Module. This is available under the Servoy Package Manager. Alternatively you can also download this module directly from our github repository.

Initialize the module

Select your main solution and hook up the onOpen event to a new scope method.

You can also hook up a callback method if you need access to native functionality as soon as the device is ready. Your code might look like below

function onSolutionOpen(arg, queryParams) {
//initialize phonegap module
scopes.phonegap.onSolutionOpen(arg,queryParams, onReadyCallback);

}	

function onReadyCallback(){
//device is ready, get information from a plugin
application.output(plugins.svyphonegapDevice.getDeviceInfo());
}

Integrating with your first plugin

Integration examples can be found per plugin for example the Camera plugin guide.

Building a mobile binary

Once you are satisfied with the main solution and code. We will want to be able to export and run this app on a mobile device. First deploy the Servoy solution. Then follow the Building Native Binary guide.

Last updated

Was this helpful?