This app shows how to use Java band BXML to implement call and text features, plus call and text forwarding. The app uses Spark, a micro framework for creating web applications, along with the Velocity template engine. Any calls made to the number will be forwarded to Raleigh, NC weather station by default. Texting the number forwards to another Bandwidth number.
The app was created by modifying the basic app provided in Heroku app in their (Getting Started on Heroku with Java) article.
Before installation you must have the following:
- A Bandwidth Application Platform account (sign up here)
- Your App Platform userId, apiToken and apiSecret (see here)
You'll need a heroku account and to also set the environment variables.
- BANDWIDTH_USER_ID (found on the account tab of the developer console)
- BANDWIDTH_API_TOKEN (found on the account tab of the developer console)
- BANDWIDTH_API_SECRET (found on the account tab of the developer console)
- PHONE_NUMBER (Bandwidth number associated with your app on the my apps tab)
These environment variables can be set in the settings tab of the Heroku dashboard, under Config Variables.