# Background Work + Push Notifications

## Android <a href="#title-text" id="title-text"></a>

### Background Work  <a href="#background-work" id="background-work"></a>

The Android SDK includes a foreground service that enables your application to continue running when it’s not in the foreground (i.e. it’s in the background). It will remain active from `Zello.connect()` until `Zello.disconnect()`.

This service is required for your app to work when it’s in the background. If background operation is not necessary—or if you have your own foreground service—you can disable the SDK’s foreground service using the `Zello.configure()` method.

Additionally, the SDK will display a notification prompting the user to disable battery optimizations.

<figure><img src="https://4044079343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJDeY8ZTjHc3MGfrKtEGo%2Fuploads%2FHdUMovNWyc4XgXzfNxx3%2F46e04e91-a358-44af-bf97-dc4dd275cf6e.png?alt=media&#x26;token=d73b68b0-6528-4419-80d9-a8506c2f05d3" alt=""><figcaption></figcaption></figure>

### Push Notifications

To send push notifications to Android devices via the SDK, Zello uses [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) (FCM). Push notifications are used differently for direct contacts and channels:

| Direct Contacts | Used for all messages sent to direct contacts in [Standby](https://paidsupport.zello.com/hc/en-us/articles/26985025569805-Standby-Status) status.                              |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Channels        | Used for [channel alerts](https://paidsupport.zello.com/hc/en-us/articles/26989961014669-Sending-Channel-Alerts) sent at the “Everyone” level. This includes emergency alerts. |

**Enabling/Disabling Push Notifications**

If you’d like to push notifications on your Android application, first add FCM to your project. Then, email us at <sdk@zello.com>. We will enable a feature on our Zello Work Console to allow you to upload your FCM key. This key will be securely stored on Zello’s servers, and will allow us to send your users push notifications.&#x20;

Alternatively, if you currently have push notifications enabled in the SDK and would like to disable them, opt out using the `Zello.configure()` method.

### iOS <a href="#ios" id="ios"></a>

#### Background Work <a href="#background-work.1" id="background-work.1"></a>

Please see the [iOS Getting Started guide](https://developers.zello.com/sdk/latest/ios/documentation/zellosdk/getting-started#Allow-Zello-to-Run-in-the-Background) for project setup.

**Push to Talk Framework Setup**

Please see the [iOS Getting Started Guide](https://developers.zello.com/sdk/latest/ios/documentation/zellosdk/getting-started#Configure-the-Push-to-Talk-Framework) for project setup.

#### Push Notifications <a href="#push-notifications.1" id="push-notifications.1"></a>

Please see the [iOS Getting Started Guide](https://developers.zello.com/sdk/latest/ios/documentation/zellosdk/getting-started#Configure-a-Notification-Service-Extension) for project setup.

Zello uses Apple’s servers to deliver push notifications. Please email your APN key to <sdk@zello.com> to enable push notifications for your network. The APN key will be securely stored on our servers.\ <br>
