This is a sample Android application demonstrating the Urban Airship (Airship) SDK integration.
Note: this project expects an Urban Airship (Airship) configuration file and the Google services configuration file for Firebase/Google Play services.
- Copy the Airship config sample:
- The sample config is located at
app/src/main/assets/airshipconfig.properties.sample. - Copy it to
app/src/main/assets/airshipconfig.propertiesand enter your credentials.
- The sample config is located at
- Add your
google-services.jsonfile:- Download
google-services.jsonfrom the Firebase console for your project. - Place the file in the
app/directory.
- Download
From the project root, copy the sample Airship config file to create your own:
cp app/src/main/assets/airshipconfig.properties.sample app/src/main/assets/airshipconfig.propertiesOpen the newly created airshipconfig.properties and fill in your Airship credentials (app key, app secret).
Download google-services.json from the Firebase console. Then copy or move the file into the app/ directory of this project:
cp ~/Downloads/google-services.json app/The Android Gradle plugin expects google-services.json to live at app/google-services.json.
From the project root, use the included Gradle wrapper to build:
./gradlew clean assembleDebugTo install on a connected device or emulator:
./gradlew installDebugOr open the project in Android Studio and run the app configuration.
- When the app starts, it should initialize the Airship SDK using values in
airshipconfig.propertiesand any Firebase integrations should be available ifgoogle-services.jsonis correct. - Check logcat for messages from
UALib(Airship) to confirm initialization.
- "Missing airshipconfig.properties" or runtime errors referencing missing config: make sure you copied the sample file and filled required values.
- Gradle build errors related to Google Services: ensure
google-services.jsonis inapp/and the Google services plugin is applied inapp/build.gradle. - If you see any Firebase initialization errors, double-check the package name (applicationId) in
app/build.gradlematches the package registered in the Firebase console. - If builds are stale, try
./gradlew cleanthen rebuild.
Ensure that the airshipconfig.properties and google-services.json files are not included in version control.
The .gitignore file in this project already excludes these files by default.