/quickstart-cordova

HyperTrack Plugin for Cordova usage sample

Primary LanguageJavaScriptMIT LicenseMIT

Cordova Quickstart for HyperTrack SDK

GitHub cordova-plugin-hypertrack-v3

HyperTrack lets you add live location tracking to your mobile app. Live location is made available along with ongoing activity, tracking controls and tracking outage with reasons.

This repo contains an example Cordova app that has everything you need to get started.

For information about how to get started with Cordova SDK, please check this Guide.

How to get started?

Create HyperTrack Account

Sign up for HyperTrack and get your publishable key from the Setup page.

Set up the environment

Clone Quickstart app

Install Dependencies

General Dependencies

Run npm install

iOS dependencies

Quickstart app uses CocoaPods dependency manager to install the latest version of the iOS SDK. Using the latest version of CocoaPods is advised.

If you don't have CocoaPods, install it first.

cd ios
pod install

Add platforms

Add platforms

Configure Android platform

Add build params to quickstart-cordova/platforms/android/gradle.properties:

cdvSdkVersion=31

Update the publishable key

Follow the instructions for setting the publishable key for iOS and Android.

HyperTrack SDK needs Firebase Cloud Messaging to manage on-device tracking as well as enable using HyperTrack cloud APIs from your server to control the tracking.

Run the app

Build the app

Run cordova build

Android

Run cordova run android

iOS

Open the app's workspace file (/ios/QuickstartCordova.xcworkspace) with Xcode.

Select your device (SDK requires real device, it won't work using simulator) and hit Run.

If you have "Unsupported Swift Version" error

Set Build Settings > Swift Compiler - Language > Swift version to the latest version

Grant permissions

Grant location and activity permissions (choose "Always Allow" for location).

Start tracking

Press Start tracking button.

To see the device on a map, open the HyperTrack dashboard.

Support

Join our Slack community for instant responses. You can also email us at help@hypertrack.com