> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/how-the-apps-work/screens/notifications/settings.md).

# Notification settings

{% hint style="info" %}
Draft, written by an agent and not yet checked by a person ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). Platforms: iOS and Android. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/notifications/settings.md).
{% endhint %}

Users choose which chat and task events send them a push notification. Both apps also hold a compliance switch that never shows \[[ASK-164](https://github.com/snapfix/docs/blob/main/ASK.md#ask-164-should-compliance-changes-on-a-task-alert-people-and-may-they-switch-them-off)].

* **Where:** iOS: "Notifications", the first tab of the profile hub (`MainProfileVC`), beside [My profile](https://docs.snapfix.com/how-the-apps-work/screens/account/profile.md), [Settings](https://docs.snapfix.com/how-the-apps-work/screens/account/app-settings.md) and [Help Hub](https://docs.snapfix.com/how-the-apps-work/screens/help/help-hub.md) (ios @ aa31967ac8, `SnapFix/New Profile/MainProfileVC.swift:23-24`). The side menu opens the hub on one of those three tabs, so users reach this one by tapping it (`SnapFix/SideMenuVC.swift:607-631`, `:707-716`). Code that opens the hub without naming a tab lands here, through the `openset` notification (`SnapFix/BusinessListingVC.swift:1454`, `:1572-1577`), but nothing a user can tap sends it today: the side menu's older buttons sit under the full-screen drawer, and the confirmation popup that sends it is never opened (`SnapFix/SideMenuVC.swift:88`, `:524-529`, `:977-978`; `SnapFix/BusinessListingVC.swift:290`). Android: the "Notifications" chip of the profile screen (`MyProfileActivity`), which the screen opens on unless the caller asks for another chip (android @ 86068bfeea, `app/src/main/java/gmail/com/snapfixapp/activity/MyProfileActivity.kt:202-212`, `:231-236`). The profile photo on the Home and group list screens opens it (`app/src/main/java/gmail/com/snapfixapp/fragment/HomeFragment.java:98-99`, `app/src/main/java/gmail/com/snapfixapp/fragment/GroupListingFragment.java:219-221`). So do "Go To Profile" on the account verification sheet, "My Profile" in the free-tier menu and the edit button of the verification code dialog, where iOS opens "My Profile". The drawer's profile row opens "My Profile" (`app/src/main/java/gmail/com/snapfixapp/activity/BusinessListingActivity.java:1001-1004`).
* **Who:** any signed-in user, for their own settings. No role changes the screen. Both apps send the switches with the signed-in user's ID (ios @ aa31967ac8, `SVProgressHUD/FCMHelper.swift:1710`; android @ 86068bfeea, `app/src/main/java/gmail/com/snapfixapp/utils/FirebaseTokenUtils.java:53-58`).
* **Feature:** [Push notifications](https://docs.snapfix.com/product/features/notifications/push-notifications.md)

## Layout

Top to bottom, the same on both apps (ios @ aa31967ac8, `SnapFix/Storyboards/ProfileSB.storyboard:240-1240`; android @ 86068bfeea, `app/src/main/res/layout/layout_content_profile_notification.xml:22-670`):

1. **"Chat Notifications":** a card with one switch.
2. **"Compliance Notifications":** a card that both apps always hide (ios `SnapFix/New Profile/Notification Settings/NotificationSettingsVC.swift:114`; android `layout_content_profile_notification.xml:75-81`) \[[ASK-164](https://github.com/snapfix/docs/blob/main/ASK.md#ask-164-should-compliance-changes-on-a-task-alert-people-and-may-they-switch-them-off)].
3. **"Task Notifications":** a card whose switch is the master switch for the task switches in it:

   * "Send me a Notification:", then "When a Task is created", "When I am assigned to a Task", "When a Message is added to a Task", "When a Reminder is activated" and "When a Checklist is 100% complete";
   * "When a Traffic Light is Updated:", then "For Tasks I created", "For Tasks I am Assigned" and "For all other Tasks";
   * "When a Priority task is Updated:", then three switches: "Only for tasks I created", "For Tasks I am Assigned" and "For all other Tasks" on iOS, and "For Tasks I created", "For Tasks I am Assigned" and "For all other Priority tasks" on Android. The iOS storyboard holds the Android texts, but each label's string key replaces them when the screen loads (`ProfileSB.storyboard:1000-1009`, `:1110-1119`; `Generic Conrolers/GenericLabel.swift:56-63`).

   Android shows the three headings without the colon.
4. **"Notification Permission Required":** shown in place of the switches when the app may not show notifications ([States](#states)), with "We noticed that you've denied notification permissions for Snapfix. To receive important updates and alerts, please allow Snapfix to send notifications. Tap on the 'Snapfix settings' button > Notifications > and allow the notifications permission." (Android: "> Permissions >") and the button "Snapfix settings".

## Inputs

Every control is a switch. Nothing is required and nothing shows a message. Each switch is one field of the [notification settings object](https://docs.snapfix.com/engineering-reference/api/notifications.md#notification-settings-object), and "Task Notifications" also goes to the server as the device's `notifications` flag. Which pushes each switch controls, and which pushes ignore the switches, is in [Push delivery](https://docs.snapfix.com/engineering-reference/api/notifications.md#push-delivery).

The defaults are what both apps show while nothing is saved on the device, until the server's settings arrive, and what they keep when the server has none for the user (ios @ aa31967ac8, `SnapFix/New Profile/Notification Settings/View Model/NotificationSetting.swift:19-45`; android @ 86068bfeea, `app/src/main/java/gmail/com/snapfixapp/model/UserNotificationSetting.kt:25-63`, `app/src/main/java/gmail/com/snapfixapp/utils/PrefUtils.java:541-551`). The settings table has other defaults for four of them \[[ASK-171](https://github.com/snapfix/docs/blob/main/ASK.md#ask-171-what-should-four-notification-switches-default-to)].

| Field                                                                                                      | Type   | Required | Default | Rules and messages                                                                                                                                               |
| ---------------------------------------------------------------------------------------------------------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Chat Notifications" (`fFirebaseChatCreated`)                                                              | Switch | No       | On      | Never turns "Task Notifications" on or off, and turning "Task Notifications" off leaves it as it is. On iOS, turning "Task Notifications" back on can change it. |
| "Task Notifications" (`fAllNotifications`)                                                                 | Switch | No       | On      | Off turns every task switch off. On brings task switches back, by the rules below.                                                                               |
| "When a Task is created" (`fJobCreated`)                                                                   | Switch | No       | On      | Task switch                                                                                                                                                      |
| "When I am assigned to a Task" (`fJobAssignedToMe`)                                                        | Switch | No       | On      | Task switch                                                                                                                                                      |
| "When a Message is added to a Task" (`fChatCreated`)                                                       | Switch | No       | Off     | Task switch                                                                                                                                                      |
| "When a Reminder is activated" (`fJobReminderActivated`)                                                   | Switch | No       | Off     | Task switch. What reminders send is in [Reminders](https://docs.snapfix.com/product/features/notifications/reminders.md)                                         |
| "When a Checklist is 100% complete" (`fTodoCompleted`)                                                     | Switch | No       | Off     | Task switch                                                                                                                                                      |
| Traffic light: "For Tasks I created" (`fStatusJobCreatedByMe`)                                             | Switch | No       | On      | Task switch                                                                                                                                                      |
| Traffic light: "For Tasks I am Assigned" (`fStatusJobAssignedtoMe`)                                        | Switch | No       | On      | Task switch                                                                                                                                                      |
| Traffic light: "For all other Tasks" (`fStatusAllOtherJob`)                                                | Switch | No       | Off     | Task switch                                                                                                                                                      |
| Priority: "Only for tasks I created" on iOS, "For Tasks I created" on Android (`fPriorityJobCreatedByMe`)  | Switch | No       | On      | Task switch                                                                                                                                                      |
| Priority: "For Tasks I am Assigned" (`fPriorityJobAssignedtoMe`)                                           | Switch | No       | On      | Task switch                                                                                                                                                      |
| Priority: "For all other Tasks" on iOS, "For all other Priority tasks" on Android (`fPriorityJobAllOther`) | Switch | No       | Off     | Task switch                                                                                                                                                      |

The hidden compliance switch saves nothing: iOS never sends `fComply`, Android has no such field, and the settings table has no such column (ios `NotificationSetting.swift:47-63`, `:125-141`; [`tPri_UserNotifSettings`](https://docs.snapfix.com/engineering-reference/db/tables/tpri_usernotifsettings.md)).

Rules for the switches, on both apps unless noted:

* **"Task Notifications" off:** every task switch goes off; "Chat Notifications" stays as it is (ios @ aa31967ac8, `SnapFix/New Profile/Notification Settings/View Model/NotificationSettingsViewModel.swift:90-104`; android @ 86068bfeea, `app/src/main/java/gmail/com/snapfixapp/activity/MyProfileActivity.kt:1091-1106`).
* **A task switch turned on while "Task Notifications" is off:** "Task Notifications" turns on, and only that task switch is on (`NotificationSettingsViewModel.swift:75-80`; `MyProfileActivity.kt:1133-1148`, `:1196-1199`).
* **"Task Notifications" on again, iOS:** every switch, "Chat Notifications" included, goes back to the copy iOS saved on this device the last time the switch went off. If it went off on another device, that copy is older, or the defaults (`NotificationSettingsViewModel.swift:90-109`; `NotificationSetting.swift:99-110`).
* **"Task Notifications" on again, Android:** the task switches come from a separate copy on the device, which records each task switch change made on this screen. A switch never changed on this device comes back with its default, so the switches can differ from what was on screen before (`MyProfileActivity.kt:1061-1090`, `:1133-1199`; `app/src/main/java/gmail/com/snapfixapp/utils/PrefUtils.java:562-581`).

## Actions

| Action                     | Who                | What happens                                                                                                                                                                                                                                                                                                                                                                  | API                                                                                                                                     |
| -------------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Open the tab               | Any signed-in user | Shows the switches saved on the device at once, then asks the server and shows its values when they arrive. iOS always asks; Android only when online (ios @ aa31967ac8, `SnapFix/New Profile/Notification Settings/NotificationSettingsVC.swift:50-59`; android @ 86068bfeea, `app/src/main/java/gmail/com/snapfixapp/activity/MyProfileActivity.kt:587-595`, `:2259-2272`). | [`GET /user-notification-settings`](https://docs.snapfix.com/engineering-reference/api/notifications.md#get-user-notification-settings) |
| Change a switch (iOS)      | Any signed-in user | Saves the switches on the device and sends them all with the push token at once (`NotificationSettingsVC.swift:78-105`; `SnapFix/New Profile/Notification Settings/View Model/NotificationSettingsViewModel.swift:82-88`; `SVProgressHUD/FCMHelper.swift:1704-1720`).                                                                                                         | [`POST /fbu_devicetoken`](https://docs.snapfix.com/engineering-reference/api/notifications.md#post-fbu_devicetoken)                     |
| Change a switch (Android)  | Any signed-in user | Moves the switch and, for a task switch, updates the device copy that "Task Notifications" restores from. The settings are not saved or sent until the user leaves the screen, and the change is lost if the app closes first (`MyProfileActivity.kt:649-652`, `:1133-1199`).                                                                                                 | None                                                                                                                                    |
| Leave the screen (Android) | Any signed-in user | Back saves the switches on the device and sends them with the push token. With unsaved profile changes, the profile's save runs instead and saves the switches with it; a profile that fails its checks keeps the screen open (`MyProfileActivity.kt:1522-1528`, `:1652-1660`, `:1722-1725`, `:2055-2070`, `:2091-2107`).                                                     | [`POST /fbu_devicetoken`](https://docs.snapfix.com/engineering-reference/api/notifications.md#post-fbu_devicetoken)                     |
| "Snapfix settings"         | Any signed-in user | iOS closes the profile hub and opens the app's page in the iOS Settings app (`NotificationSettingsVC.swift:106-109`). Android opens the app's system settings page and shows the toast "Tap on Permissions and allow permissions."; the profile screen stays open (`MyProfileActivity.kt:785-791`).                                                                           | None                                                                                                                                    |

Both apps also send the saved switches each time they save the push token, for example when the app gets a new one ([POST /fbu\_devicetoken](https://docs.snapfix.com/engineering-reference/api/notifications.md#post-fbu_devicetoken)).

## States

* **Loading:** no spinner. The switches show the device's values, or the defaults on a new install, until the server's arrive.
* **Empty:** none; every switch always has a value.
* **Error:** a failed load keeps the switches as they are, with no message. A failed save shows nothing on either app; iOS sends again with its next push-token save (ios @ aa31967ac8, `SVProgressHUD/FCMHelper.swift:1712-1718`).
* **No permission:** iOS shows the permission card, and hides "Chat Notifications" and the task card, whenever the system does not report notifications as allowed. It checks when the tab loads (`SnapFix/New Profile/Notification Settings/NotificationSettingsVC.swift:50-55`, `:111-116`). Android 13 and later show the card in place of the task card but keep "Chat Notifications", and check each time the screen comes to the front. Android 12 and earlier never show the card (android @ 86068bfeea, `app/src/main/java/gmail/com/snapfixapp/activity/MyProfileActivity.kt:642-646`, `:2509-2519`).
* **Offline (mobile):** the switches still change. iOS keeps a change on the device and sends it with its next push-token save. Android skips the send when the user leaves offline, with no message, and sends the saved switches with its next push-token save, which runs when the app gets a new token or the old one is due for a refresh (`app/src/main/java/gmail/com/snapfixapp/utils/FirebaseTokenUtils.java:40-44`; `app/src/main/java/gmail/com/snapfixapp/activity/BaseFirebaseActivity.java:118-124`). Until then the server pushes by the old settings, and neither app says so.

## Dialogs and sheets

None. "Snapfix settings" leaves the app ([Actions](#actions)).

## Platform differences

| Topic                            | iOS                                                                                                                                                              | Android                                                                                                                                                                                                                                                |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Opens straight on this tab       | From no current path; users tap the tab                                                                                                                          | From the profile photo, "Go To Profile" and the other profile shortcuts                                                                                                                                                                                |
| When a change reaches the server | At once                                                                                                                                                          | When the user leaves the screen or saves the profile                                                                                                                                                                                                   |
| "Task Notifications" on again    | The copy saved when it last went off on this device, "Chat Notifications" included                                                                               | The task switches from a device copy of the changes made here, or the defaults                                                                                                                                                                         |
| Permission check                 | When the tab loads; any state other than allowed                                                                                                                 | Android 13 and later only, each time the screen comes to the front                                                                                                                                                                                     |
| Without permission               | Every switch hidden                                                                                                                                              | The task switches hidden, "Chat Notifications" shown                                                                                                                                                                                                   |
| Priority labels                  | "Only for tasks I created", "For all other Tasks"                                                                                                                | "For Tasks I created", "For all other Priority tasks"                                                                                                                                                                                                  |
| Headings                         | End in a colon                                                                                                                                                   | No colon                                                                                                                                                                                                                                               |
| Permission text                  | "> Notifications >"                                                                                                                                              | "> Permissions >"                                                                                                                                                                                                                                      |
| "Snapfix settings"               | Closes the profile hub                                                                                                                                           | Keeps the screen open and shows a toast                                                                                                                                                                                                                |
| Analytics                        | "Task Notifications" logs `a_userprofile_notificationoff` both ways, and "Chat Notifications" logs the on-call events (`NotificationSettingsVC.swift:83`, `:97`) | `a_userprofile_notificationon` and `a_userprofile_notificationoff`. "Chat Notifications" logs nothing; `a_profile_notiftab_chatnotif_on` and `_off` come from "When a Message is added to a Task" (`MyProfileActivity.kt:1063`, `:1093`, `:1159-1161`) |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/how-the-apps-work/screens/notifications/settings.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
