This repository contains the Cordova Plugin and sample apps for Acoustic Mobile Customer Engagement.
Plugins are structured like so:
assets
- Images, CSS, or other non-code filesscripts
- Hooks to run at specific points during the installation process. Configured inconfig.xml
.src
- Android and iOS plugin source filestypes
- TS/JS types for the publicly-exposed plugin functionswww
ts
- TS source code filesjs
- Compiled JS files
index.d.ts
- Type file containing all types used in the plugin. Should mostly be comprised of imports of types from thetypes
folder.package.json
- NPM package fileplugin.xml
- Cordova plugin configuration filetsconfig.json
- TypeScript configuration file
To build the plugins, cd
into the plugins directory and run sh build.sh
.
- Before you can build the sample app, you'll need to generate a
google-services.json
file from Firebase. To do that, setup an Android app in Firebase and download thegoogle-services.json
. The Android app's name must beco.acoustic.mobile.push.samples.android
. - Place the
google-services.json
in this repository atapplications/samples/Sample
. - Open a terminal and navigate to
applications/samples/Sample
. - In the line beginning with
cordova plugin add file:../../../plugins/co.acoustic.mobile.push.sdk
inpostinstall_cordova.sh
, configure the Acoustic SDK to your app's requirements. You will need to modify at least the app keys and the server URL. - Run
npm i
. - Run
cordova build android
. This will create an APK file that you can run on your emulator atapplications/samples/Sample/platforms/android/app/build/outputs/apk/debug
.