Maintainer needed. PRs welcomed. If you actively use this and want to become a maintainer let us know at help@smooch.io.
smooch-cordova
Cordova (PhoneGap) bindings for Smooch.
Basic Setup
Install Smooch
For iOS: http://docs.smooch.io/#manual-method
For Android: Gradle does the work for you!
Install Cordova plugin
cordova plugin add smooch-cordova
You should now see smooch-cordova.js and the SmoochCordova source files in your project directory.
Init Smooch with appId
iOS
In your javascript:
Smooch;
IMPORTANT: This call must be made AFTER the deviceready
event of Cordova.
See http://docs.smooch.io/api/ios/Classes/SKTSettings.html for other init settings.
Android
In io.smooch.cordova.SmoochApplication.java
, change <your_app_id>
to your app id. This file is located inside the src
folder of the android project.
Locate the file called AndroidManifest.xml in the root of your Android project. Inside the <application>
tag, add android:name="io.smooch.cordova.SmoochApplication"
That's it! See http://docs.smooch.io/api/android/ for other init settings.
To enable push notifications, follow the docs here.
Show Smooch
Now, you're ready to show the Smooch chat window.
Smooch;
Awesome Setup
Add user info
Smooch;
Add custom user properties
Smooch;
Login
With JWT:
Smooch;
Without:
Smooch;