Stock Master Tracker docs
v2.0.0
Get help
● Set up · FCM

Alerts and push
checked on the server.

Alerts are evaluated by the backend every 5 minutes, so they fire even when the app is closed. Push campaigns let you message everyone, Pro or free users.

Every 5 minutesFirebase Cloud Messaging9 languages

01Alert types

TypeFires when
Price above / belowThe price is at or above / below the target.
Up / down by %The price moved by at least the percentage from the price when the alert was created or re-armed.
Earnings tomorrowBetween 09:00 and 20:59 New York time on the day before the company reports.
New SEC filingA new 8-K, 10-Q or 10-K appears on EDGAR.
Insider purchaseA new Form 4 with transaction code P (an open-market purchase) appears.
  • The function evaluateAlerts runs every 5 minutes. A short price spike between two checks can be missed; say so in your store listing if you promise alerts.
  • Event alerts fire once per event (deduplicated by filing number or earnings date) and only for events newer than when the alert was created or last re-armed. Repeat "once" stops after the first event; the default keeps watching.
  • Price alerts need the display licence confirmed: without it they wait, and event alerts still run (Market data).
  • The push text is in the device's language, and tapping it opens the company.
  • How many active alerts a user may have is enforced by the server: 3 free, 100 Pro by default (Console → Pro and purchases). Invalid push tokens are removed automatically.
  • The console's Alerts page shows active alerts by type and ticker and the triggers of the last 7 days.

Source: firebase/functions/src/api/alerts.ts, docs/CONTRACT-STOCKS.md.

In the example build

There is no Firebase. Alerts live on the device and the app does not send push.

02Set up Firebase Cloud Messaging

  1. AndroidNothing extra beyond flutterfire configure (Installation). On Android 13 and newer the app asks for the notification permission (POST_NOTIFICATIONS is declared in AndroidManifest.xml).
  2. iOS: APNs keySee below. Without it iOS devices receive no push. Use a real device, not the Simulator.
  3. Deploy the backendevaluateAlerts and sendCampaigns deploy with the other functions (Firebase).

The app registers its push token with the API and subscribes to the topic all plus pro or free (app/lib/services/push_service.dart).

03APNs key (iOS)

  1. Create the keyApple Developer account → Certificates, Identifiers & Profiles → Keys → +, enable Apple Push Notifications service (APNs), download the .p8 file once, and note the Key ID and your Team ID.
  2. Upload it to FirebaseProject settings → Cloud Messaging → your iOS app → APNs Authentication Key → Upload.
  3. CapabilityThe Runner target has the Push Notifications entitlement (aps-environment in app/ios/Runner/Runner.entitlements, set to development; Xcode switches it for App Store builds) and the remote-notification background mode. After you change the bundle id, check both under Signing & Capabilities.
Keep the .p8 file private

It is a signing key for your Apple account. Never put it in the app, in git or in a support message.

04Push campaigns

Console → Push campaigns: a title and message, a segment (all, Pro or free users), optionally a ticker to open when tapped, and a time, or Send now. You can cancel while it is scheduled.

The console never sends a message itself. It stores the campaign; the backend's sendCampaigns job (every 5 minutes) sends due campaigns to the FCM topic of the segment, so "Send now" goes out within about 5 minutes.

Store rules for promotional push

Apple and Google restrict marketing notifications. Do not use push for advertising without the user's consent, and never send investment tips or price predictions.

The console Push campaigns page
Push campaigns