# 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](https://docs.servoy.com/reference/servoy-developer/package-manager). Alternatively you can also download this module directly from our [github repository](https://github.com/servoy/svyPhonegap).

<figure><img src="https://3933488479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjpWd52BKwABWxF2lScUK%2Fuploads%2Fgit-blob-d34888adf236b51dea077d4aa636edf4e2da5c65%2Fd6.png?alt=media" alt=""><figcaption></figcaption></figure>

## Initialize the module

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

<figure><img src="https://3933488479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjpWd52BKwABWxF2lScUK%2Fuploads%2Fgit-blob-00fb890b730f4c86839889551a96b9d0b0ffa9d7%2Fd7.png?alt=media" alt=""><figcaption></figcaption></figure>

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

```javascript
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](https://docs.servoy.com/guides/develop/programming-guide/extensions/modules/svyphonegap/camera).

## 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](https://docs.servoy.com/guides/deploy) the Servoy solution. Then follow the [Building Native Binary](https://docs.servoy.com/guides/develop/mobile-development/exporting-to-an-app-store) guide.
