This guide is a quick start to adding the Phunware Messaging SDK to an Android app. Android Studio is the recommended development environment for building an app with the Phunware Messaging SDK.
Step 1- Add the Phunware Maven remote repository. Insert this block into
Be sure to replace username and password with the your credentials.
Step 2 - Add the Mapping SDK as a dependency in your app's
Step 3 (Optional) - Add beacon support if you are using beacons
If you would like to take advantage of the Messaging SDK's beacon support, simply add the
With properly configured beacons in your environments, no other code changes are required to take advantage of beacon based messaging.
Step 4 - Add Phunware keys for App Id, Access Key, Signature Key and Encryption Key
The App Id, Access Key, Signature Key and Encryption Key are found on the MaaS portal.
Step 5 - Configure the Messaging SDK with your environment.
You should only initialize the Messaging SDK once. Once it's complete, you can access the Location, Message and Attribute managers directly.
Once initialization is complete, users will be automatically notified with your custom messages for location events, like entering a retail store.
Step 6 - Show Messages
MessageManager you can easily show a list of available messages. Note that calls to the MessageManager are asynchronous, and may require loading data from the network.