The latest Vibes Push Notifications Android SDK installation instructions are also located in the Vibes SDK repository .
Vibes SDK - Android
An Android SDK for handling push integration with the Vibes Platform API.
The Android install files are available from the Vibes Github Repository.
Installing the Android SDK
Click Add Firebase and follow the instructions on the Firebase website. This will include setting up the Google Services plugin and downloading the
google-services.jsoninto your App folder.Note: This will take you away from this Vibes documentation Wiki
Click Add Firebase Cloud Messaging and follow the instructions. This will include adding two services to your App to handle App token refresh and incoming push notifications.Note: This will take you away from this Vibes documentation Wiki
Add the Vibes SDK by doing the following:
Add the following to your project-level
Add the following to your project- or system-level
gradle.propertiesfile:Note: Do not commit this file to version control.
Add the following to your app-level
- Sync your project in Android Studio.
Using an Older Version of Google Services
If you are using an older version of Google Services (the latest version uses Firebase) to handle push notifications, you need to do the following.
Verify that the dependency Play-Services version is a minimum of 9.0.0. You can check that in your application build gradle configuration CustomerApplication/app/build.gradle.
Verify that the dependency gradle version is minimum 2.3.3 and the Google-Services is version 3.0.0. You can check that in the CustomerApplication/build.gradle.
Verify that your application doesn’t use the deprecated class GooglePlayServicesUtil. The com.google.android.gms.common.GooglePlayServicesUtil has been deprecated and replaced by import com.google.android.gms.common.GoogleApiAvailability.
If you are using it, replace the code in Code Example One below by the code in Code Example Two in your application activity (java class) where you check Google Play Services availability.
Code Example One (CustomerApplication/[ACTIVITY_CLASS_NAME].java)
Code Example Two
- If you had a deprecated version of Google Services and have followed the previous steps, the last step is to regenerate a google-services.json, then add/replace it into your App folder on https://console.firebase.google.com/.
You can run the tests from within Android Studio, or via the command line with ./bin/test.
Test results live in,
Configure your root- or system-level
gradle.properties file with your Github username and either a password or a personal access token (see the sample file for format).
ARTIFACT_VERSION in the
vibes/gradle.properties file. Then run: