robinhood-options-mobile

Deep Linking & Referrals

RealizeAlpha supports deep linking for seamless navigation from external sources (emails, messages, web) directly into specific app content. It also includes a referral tracking system to reward users for inviting others.

Supported Protocols

1. Custom URL Scheme

The app responds to the realizealpha:// custom scheme. This is the most reliable way to trigger the app from non-browser environments.

The app is configured to intercept standard HTTPS links for the following domains:

Supported Routes

The following paths are supported across both custom schemes and universal links:

Target Path / Format Example
Instrument Ticker /instrument/{symbol} realizealpha://instrument/AAPL
Referral Code /?ref={id} https://realizealpha.com/?ref=USER123
Investor Group /investors?groupId={id} https://realizealpha.com/investors?groupId=...
Watchlists /watchlist realizealpha://watchlist
Group Watchlist /group-watchlist?groupId={id}&watchlistId={id} realizealpha://group-watchlist?groupId=...
Trade Signals /signals realizealpha://signals

Sharing Functionality

The app now supports easy sharing of key elements with deep link integration:

Referral System

Any supported link can include a referral code using the ref query parameter.

Example: https://realizealpha.com/instrument/TSLA?ref=USERNAME_OR_ID

How it works:

  1. Detection: When a user opens a link containing a ref parameter, the app captures the code.
  2. Persistence: The referral code is saved locally in SharedPreferences.
  3. Attribution:
    • If the user is already logged in, their User document in Firestore is updated immediately.
    • If the user is not logged in, the code remains cached and is applied to their account as soon as they sign in or create an account.
  4. Display: Users can find their own referral link and share it from the User Profile screen.

Implementation Details

Manual Routing

Native auto-routing is disabled (FlutterDeepLinkingEnabled: false) to prevent conflicts. All routing logic is managed manually in src/robinhood_options_mobile/lib/widgets/navigation_widget.dart via the app_links package.

Security & Robustness

Platform Configuration

Android

Managed in AndroidManifest.xml via <intent-filter> blocks.

iOS