Summary: Deep linking in the 7Mind mobile app uses the app_links package for URI capture and the Adjust SDK for shortlink resolution on iOS. Schemes vary by flavor, universal links run through the Adjust domain sevenmind.go.link, a /login link can carry a full session (magic login link), and a route alias exists specifically to handle Aury webview links. Sources: direct code inspection (lib/app/routes/deep_link_handler.dart, lib/app/app_module.dart, android/app/build.gradle in 7mind-mobile-apps-monorepo; commit bf75eb2ce); re-checked against origin/main at 4.0.9 on 2026-11-09 (lib/app/routes/magic_login_link.dart, ios/Runner/Runner.entitlements, android/app/src/*/AndroidManifest.xml, MainActivity.kt, PR 1544 for MIND-815) Last updated: 2026-11-09


URL schemes by flavor

Configured at the Android flavor level (android/app/build.gradle:96-117):

FlavorSchemeApp ID
productionsevenmindde.sevenmind.android
stagingsevenmindstgde.seven_mind.android.stg
zppsevenmindstgde.seven_mind.android.stg

iOS schemes are declared in ios/Runner/Info-production.plist and Info-staging.plist ($(DEEPLINK_SCHEME)) and match the same naming.

  • iOS associated domains (ios/Runner/Runner.entitlements): applinks:sevenmind.go.link and applinks:4bw6.adj.st, both Adjust link domains.
  • Android: a verified app link intent filter for http and https on sevenmind.go.link in the manifests.

Examples of links the handler resolves: sevenmind://monetization/false/false (push, in-app message, content card) and https://sevenmind.go.link/monetization/false/false?adj_t=... (Adjust) both open the paywall. A content collection opens with sevenmind://navbarRoutes/libraryRoot/collection/<id>.

Capture and dispatch

lib/app/routes/deep_link_handler.dart uses the app_links package to:

  1. Read the initial link the app was launched from
  2. Subscribe to a stream of incoming links while the app runs
  3. Queue links arriving before markAppReady() is called, so deep links that fire during splash do not get dropped
  4. On iOS only, route URIs that do not start with sevenmind through Adjust processAndResolveDeeplink first, to resolve shortened tracking links into their underlying app URL
  5. Check for a magic login link before converting the URI into a route (see below)

On Android, MainActivity also passes every incoming intent to Adjust.processDeeplink (in onCreate and onNewIntent) so Adjust records the click. The URI itself reaches Dart unchanged.

A /login link that carries a full session signs the user in instead of opening the login screen, so CRM can put a one-tap login button in an email. Parsed in lib/app/routes/magic_login_link.dart, live since app 3.3.28.

  • Shape: sevenmind://login?access_token=..&id_token=..&refresh_token=.., or the same tokens in the URL fragment (#access_token=..). Staging and zpp use sevenmindstg://.
  • Custom scheme only. A universal link on sevenmind.go.link is never read as a login link.
  • All three tokens must be present. Tokens the backend accepts sign the user in and open Home; rejected tokens leave the user signed out on the login screen.
  • A /login link without a full token set signs nobody in: it opens Home with a session and the login screen without one.
  • A login link that arrives during splash is held until the app is ready, then handled before any other queued link, because it is what lets those links past the auth guard.
  • Tokens are masked before a link is logged (MagicLoginLink.redact) and never reach flutter_modular.

The Aury webview alias gotcha

lib/app/app_module.dart:238-242 registers /courseDetail (singular) as an alias of /courseDetails (plural). The Aury webview emits deep links with the singular spelling. Both routes resolve to CourseDetailModule. Removing the alias breaks Aury course launches.

Reference fix commit: bf75eb2ce. The pattern is intentional, not a duplicate.

Most deep-link targets are wrapped by AuthGuard(). Unauthenticated users who tap a deep link are redirected to the splash and auth flow; the original deep-link target is then handled after sign-in completes.

What agents should know

  • Do not change or “fix” the sevenmindstg scheme used by both staging and zpp. Tooling and Adjust campaigns rely on the existing values.
  • Shortlink resolution in Dart is iOS-only. On Android the app only reports the link to Adjust (Adjust.processDeeplink in MainActivity); it does not resolve shortlinks in-app.
  • A magic login link is a live session in plain text. Never log a raw incoming link; use MagicLoginLink.redact.
  • When adding a new route that should be deep-linkable, register it in lib/app/app_module.dart and confirm the auth-guard behavior matches the rest of the table.
  • The /courseDetail alias must stay until the Aury team can update its webview to use the plural form. See aury-companion.
  • Deep-link parameters arriving on a cold start may race with the splash; rely on the in-app queue in deep_link_handler.dart rather than reading the URI in your own widget’s initState.