# Push notifications

 There's a new version available!

These pages cover version 2 of our SDK, but a newer version is available. In general, we suggest that you update to the latest version to take advantage of new features and fixes.

*   Are you new to our SDKs? [Check out the latest docs.](/integrations/sdk/android/getting-started)
*   Otherwise, [learn about updating to the latest version](/integrations/sdk/android/whats-new/)

Get started setting up push notifications for Android. Our Android SDK supports push notifications over FCM.

This page is part of a setup flow for the SDK. Before you continue, make sure you've implemented previous features—i.e. you can't receive push notifications before you identify people!

## Before you begin[](#before-you-begin)

This page explains how to receive push notifications using our SDK. However, before you can send push notifications to your audience, you need to enable Customer.io to send push notifications through [Firebase Cloud Messaging (FCM)](/journeys/push-getting-started/#for-android).

This process lets you receive basic push notifications in your app—a title and a message body. To send a notification with an image, link, etc, complete the process on this page, and then see our [rich push](/integrations/sdk/android/rich-push) documentation.

### How it works[](#how-it-works)

Before a device can receive a push notification, you must:

1.  Set up [FCM](/journeys/push-getting-started/#for-android).
2.  [Set up push](#set-up-push).
3.  [Identify a person](/integrations/sdk/android/identify). When someone starts the app, they automatically generate a device token. Identifying the person associates the device token with the person in Customer.io, so that they can receive push notifications.
4.  Set up a campaign to send a push notification through the Customer.io composer.

## Set up push[](#set-up-push)

1.  You must implement the Push Messaging SDK to use push notification features.
    
    ```groovy
    implementation 'io.customer.android:messaging-push-fcm:<version-here>'
    ```
    
2.  Initialize the push module.
    
    ```kotlin
     CustomerIO.Builder(
         siteId = "siteId",
         apiKey = "apiKey",
         appContext = application,
     ).apply {
         addCustomerIOModule(ModuleMessagingPushFCM())
         autoTrackScreenViews(true)
         setRequestTimeout(8000L)
         setRegion(Region.US)
         build()
     }
    ```
    

The SDK adds a `FirebaseMessagingService` to the app manifest automatically, so you don’t have to perform additional setup to handle incoming push messages.

If your application implements its own `FirebaseMessagingService`, make sure that when you call `onMessageReceived` and `onNewToken` methods, you also call `CustomerIOFirebaseMessagingService.onMessageReceived` and `CustomerIOFirebaseMessagingService.onNewToken` respectively.

```kotlin
class FirebaseMessagingService : FirebaseMessagingService() {

 override fun onMessageReceived(message: RemoteMessage) {
    val handled = CustomerIOFirebaseMessagingService.onMessageReceived(message)
    if (handled) {
        logger.breadcrumb(this, "Push notification has been handled", null)
    }
 }
 
override fun onNewToken(token: String) {
    CustomerIOFirebaseMessagingService.onNewToken(token)
}
```

Push notifications launched from the SDK are currently posted to our default channel—`[your app name] Channel`. In the future, we plan to let you customize channels/categories so that users can subscribe and unsubscribe to content categories as necessary.

## Capture push metrics[](#capture-push-metrics)

Customer.io supports device-side metrics that help you determine the efficacy of your push notifications: `delivered` when a push notification is received by the app and `opened` when a push notification is clicked.

By default, the `messaging-push-fcm` SDK automatically tracks `opened` and `delivered` for push notifications originating from Customer.io. Otherwise, you can track push metrics with the `trackMetric` method.

```kotlin
CustomerIO.instance().trackMetric(
    deliveryID = deliveryId,
    deviceToken = deliveryToken,
    event = MetricEvent.delivered
)
```