How do I configure push notifications for Android devices for Broadcast Campaigns?
Push notifications in Android rely on Google Cloud Messaging (GCM). When setting up your app, you also need to register with GCM in order to receive push notifications from the M3 backend.
To do so, follow the steps that can be found in Googles official documentation at:
- Create a project on Firebase console
- Choose 'Add Firebase to Android app'
- In the Firebase console, the package name should be the same as application id in build.grade
- The Firebase console creates a google-services.json file and downloads it to your default Downloads folder. Drag the downloaded google-services.json file to your Android project (as documented in https://developers.google.com/cloud-messaging/android/client)
- Add the sender id to build.gradle of the app
- In the MAAS portal, for the newly created Android app, replace the API Key and sender id with the values for ServerKey and SenderId on the Firebase console (under CloudMessaging section)
How do I configure push notifications for iOS devices for Broadcast Campaigns?
This article is designed to help developers using the messaging SDK to configure push notifications for iOS based applications. Apple has some excellent documentation available to assist developers. This article assumes a basic knowledge of the developer console for apple developers.
- Obtain an apple developer account. You will need an apple developer account, and access to developer.apple.com. Note that you must have sufficient privileges in your account to manage applications and certificates.
- Go to "Certificates, Identifiers and Profiles" area and create a new App ID for your app under "Identifiers > App IDs". Note that for push messages, you need an explicit ID.
- Under "App Services" you must enable "Push Notifications"
- Save your App ID
- You now need to setup Development / Production SSL Certificates for your application, you do this by editing the App ID, and scrolling down to the Push Notifications area, and selecting "Create Certificate" under the appropriate type of certificate. Note that to debug applications, you MUST use Development SSL certificates. Note: This is especially useful if you want to debug deep linking or meta-data from a push notification when it arrives to your application in debug mode.
- Follow the instructions to create a Certificate Signing Request (CSR) for the certificate.
- Once complete, download the certificate to your computer, and install it into your Keychain.
- Once installed, you must export the certificate from your computer, and create a p.12 file. You will need to select a password for this p.12 file - remember this password, as you will need it later.
- Login to MaaS Portal and enter the Applications section under Account
- Select the appropriate application you created already, and note the section available to configure your application for certificates. Browse and upload your p.12 file, enter the password you chose in the step above, and choose if this certificate is a Production or Development certificate.
- Save the application in the portal.
- In XCode - you will need to configure your application with the appropriate bundleID, and provisioning profile depending on if your using a Development or Distribution configuration.
- Run your application - and your all set!
Terms: Use of this software requires review and acceptance of our terms and conditions for developer use located at http://www.phunware.com/terms/