> For the complete documentation index, see [llms.txt](https://dansteren.gitbook.io/cordova-plugin-gotenna/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dansteren.gitbook.io/cordova-plugin-gotenna/getting-started.md).

# Getting Started

{% hint style="info" %}
Note: Currently cordova-plugin-gotenna only supports Android. iOS support will come in a later release.
{% endhint %}

## Prerequisites

* Cordova 8.0.0
* Cordova Android 7.0.0

The minimum android sdk level supported by Cordova Plugin Gotenna is 18. Add the "android-minSdkVersion" preference to the config.xml file a the root of your cordova project:

{% code title="config.xml" %}

```markup
<widget id="tld.company.app" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <preference name="android-minSdkVersion" value="18" />
</widget>
```

{% endcode %}

## Installation

Because this plugin is still a work in progress it is not currently published on the cordova registry. In the meantime it can be installed with

```bash
cordova plugin add https://github.com/dansteren/cordova-plugin-gotenna.git
```

## Usage

The goTenna SDK is attached directly to `window`. and is accessible without any further work on your part. It is only available, however, after Cordova is available. This means you will need to wait for Cordova's [deviceready](https://cordova.apache.org/docs/en/4.0.0/cordova/events/events.deviceready.html) event to fire before gotenna is available.

{% code title="index.js" %}

```javascript
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
  // Plugins are now available.
  window.goTenna.setApplicationToken('your-token-here');
}
```

{% endcode %}

{% hint style="info" %}
REMEMBER! You must initialize goTenna with your unique goTenna developer token before you do anything else.
{% endhint %}

### A note about Typescript

Despite it being built in typescript, the plugin does not currently ship with typescript definitions. This is in part due to it's pre-stable status and changing API. In the future the plugin will ship as an ES6 module allowing you to import methods from the gotenna package directly. For now, you can use the following definition file, which is still a work in progress:

{% file src="/files/-LK2-\_zry7\_2\_8HI1XVP" %}

This definition file can be placed anywhere in your project, though I would recommend placing it right next to index.ts.
