Android Application
Android application feature allows you to generate native Android messenger application for your website, which allows you to send push and call notifications and can be published to the Google Play Market.

Requirements
-
Firebase Project
To be able to generate and publish Android application, you need to have Firebase Project with enabled Firebase Cloud Messaging (FCM).
-
Play Market Developer Account (Production Only)
To be able to publish Android application to the Google Play Market, you need to have Google Play Developer Account (25 USD one-time fee).
-
Android Device
To be able to install and test an Android application, you need to have Android device.
Create Firebase Project
For building Android application, you need to create Firebase Project and enable Firebase Cloud Messaging (FCM) for it.
Follow these steps to create Firebase Project:
-
Go to Firebase Console and login with your Google Account.
-
Click on Create a Firebase Project button to create a new Firebase Project.
-
Enter your project name (for example
yourwebsite-messenger
) and click on Continue button.Press continue until you reach the Project Overview page.
-
Click on the Add app button and select Android.
-
Enter your Android package name (for example
com.yourdomain.messenger
), app nickname and SHA-1 certificate fingerprint are optional and not required to be filled and click on Register app button.The Android package name must be unique and should follow the reverse domain name notation (e.g.,
com.yourdomain.messenger
).For development and production applications, you can use the same package name, but it is recommended to use different package names for development and production applications to avoid conflicts.
You can add one more Android package name for development purpose to the same Firebase Project or create a separated Firebase Project if you want to have a separate Firebase configuration for development and production applications.
-
Download the
google-services.json
file and save it to your computer. You will need it later to configure the Android application build. -
Click on Next button and then on Continue to console button to finish the Firebase Project creation.
-
In the Firebase Console, go to Project Settings → Cloud Messaging tab.
-
Ensure that Firebase Cloud Messaging API (V1) is enabled.
If it is not enabled, click on the 3 dots menu and enable it in Google Cloud Console.
-
Go to Project Settings → Service accounts tab and click on the Generate new private key button to download the service account key.
Save the downloaded JSON file to your computer, you will need it later to configure the Android application build in Better Messages settings.
Development & Production Builds
To generate Better Messages Android App Builds, it is required to configure for each type of build separately by uploading the google-services.json
and Firebase Admin SDK Private Key
files, which was downloaded from Firebase to WP Admin -> Better Messages -> Mobile App -> Settings -> Android page.
- Set application name
- Upload
google-services.json
file to Firebase SDK Configuration file field and select appropriate app id after upload. - Upload
Firebase Admin SDK Private Key
file to Firebase Admin SDK File field.
After thats done it should look similar to this:
The image above shows the configuration for the development build, the configuration for the production build configuration is the same.
To build the production build, you also need to Android Keystore file, which is used to sign the application before publishing it to the Google Play Market.
You can generate the Android Keystore file using Android Studio at the same page or upload the existing one if you already have it.
After you have generated or uploaded the Android Keystore file, you will be able to build the production build of the Android application.
Development Build
Development build is used for testing purposes and can be installed only to Android devices or Emulators.

You can install the development build to your Android device or Emulator by scanning QR code with camera and downloading the APK file or by downloading the APK file directly by url.
Production Build
Production build is only possible to upload to Google Play Store with AAB file, for that you need to have Google Developer Account, which is required to publish the application to the Google Play Market.
You can register for a Google Developer Account here.
