πŸ›’ Bringo

Customer App

Deep Linking

Deep links let a tapped URL open the app directly on the right screen β€” a shared product, a store, a category, an order, or a module home. The app supports two kinds of links, and the in-app routing already works out of the box; going live with website (https) links just needs your domain wired into the native files described below.

πŸ‘‰
The custom scheme (bringo://…) works with no extra setup. The https / Universal Links setup is only needed if you want your live website URLs (e.g. links shared from the site) to open the app.

1. The two link kinds

Custom scheme (id-based)
bringo://product/42, bringo://store/9, bringo://order/7, bringo://cart, bringo://orders
Website https (slug-based)
Mirrors the live site's module-prefixed URLs β€” see the table below.

2. Website URL shapes the app understands

The website browses by module-prefixed slugs. The app parses these exact shapes and maps them to the right screen. Replace DOMAIN with your live host.

Website URLOpens
https://DOMAIN/grocery/p/{slug}Product detail
https://DOMAIN/grocery/store/{slug}Store / seller page
https://DOMAIN/grocery/c/{slug}Category
https://DOMAIN/grocery/c/{cat}/{subcat}Sub-category
https://DOMAIN/groceryModule home (switches active module)
https://DOMAIN/account/orders/{id}Order detail

grocery above is one of your module slugs (grocery, ecommerce, food, pharmacy, parcel). Opening any module link also switches the app's active module.

ℹ️
Why slugs need a lookup. The website uses slugs (coriander-bunch-bl3889) but the app opens product/store/category by numeric id. So the app sends the slug to a small backend endpoint that returns the id β€” no work needed from you; it's built in. If a slug can't be resolved, the app falls back to that module's home instead of a dead tap.

3. The slug β†’ id resolver API

For reference, the app calls this public endpoint to turn a website slug into an id:

POST /api/v1_6/customer/resolveDeepLink
{ "type": "product", "module": "grocery", "slug": "coriander-bunch-bl3889" }

β†’ { "status": "success", "data": { "type": "product", "module": "grocery", "id": 1 } }

type is product, store, or category. It only returns active, non-deleted items scoped to the module.

4. Custom scheme (works immediately)

The bringo:// scheme is already declared on both platforms, so links like bringo://product/42 open the app with no further setup. If you rebrand the scheme, change it in:

Android
android/app/src/main/AndroidManifest.xml β†’ the <data android:scheme="bringo"/> intent-filter
iOS
ios/Runner/Info.plist β†’ CFBundleURLTypes β†’ the bringo scheme
Resolver
No code change needed β€” the scheme is read from the URL, not hard-coded in the parser.

5. Website https links β€” Android App Links

To make https://DOMAIN/... links open the app on Android:

  1. Set your domain in android/app/src/main/AndroidManifest.xml β€” replace YOUR_DOMAIN.com in the https intent-filter:
    <intent-filter android:autoVerify="true">
      <action android:name="android.intent.action.VIEW"/>
      <category android:name="android.intent.category.DEFAULT"/>
      <category android:name="android.intent.category.BROWSABLE"/>
      <data android:scheme="https" android:host="YOUR_DOMAIN.com"/>
    </intent-filter>
  2. Host an assetlinks.json at https://YOUR_DOMAIN.com/.well-known/assetlinks.json with your package name and signing-cert SHA-256:
    [{
      "relation": ["delegate_permission/common.handle_all_urls"],
      "target": {
        "namespace": "android_app",
        "package_name": "com.yourcompany.customer",
        "sha256_cert_fingerprints": ["YOUR_RELEASE_SHA256"]
      }
    }]
    Get the SHA-256 with ./gradlew signingReport (use the release / Play App Signing cert).
  3. Verify β€” after install, Android fetches the file and verifies the link. Test with adb shell am start -a android.intent.action.VIEW -d "https://YOUR_DOMAIN.com/grocery/p/some-slug".

6. Website https links β€” iOS Universal Links

  1. Set your domain in ios/Runner/Runner.entitlements β€” replace YOUR_DOMAIN.com in the associated-domains entry:
    <key>com.apple.developer.associated-domains</key>
    <array>
      <string>applinks:YOUR_DOMAIN.com</string>
    </array>
  2. In Xcode β†’ Runner target β†’ Signing & Capabilities, confirm Associated Domains is present (the entitlement adds it), and enable it for your App ID in the Apple Developer portal.
  3. Host an apple-app-site-association file (no extension, served as application/json) at https://YOUR_DOMAIN.com/.well-known/apple-app-site-association:
    {
      "applinks": {
        "details": [{
          "appID": "YOUR_TEAM_ID.com.yourcompany.customer",
          "paths": [ "/grocery/*", "/ecommerce/*", "/food/*", "/pharmacy/*", "/parcel/*", "/account/orders/*" ]
        }]
      }
    }
  4. Test on a real device (Universal Links don't work in the Simulator from Safari): paste a link in Notes and long-press β†’ Open in β€œYourApp”.
🚨
The shipped native files contain YOUR_DOMAIN.com placeholders. https / Universal Links stay inert until you set your real host and host the two .well-known files. The bringo:// custom scheme works regardless.

7. Push-notification deep links

Notification payloads can drive navigation too. Use either an explicit route or a typed shape:

// explicit in-app path or deep-link URI
{ "route": "/product/42" }

// typed shape
{ "type": "product", "product_id": "42" }
{ "type": "order",   "order_id": "7" }
{ "type": "store",   "store_id": "9" }
{ "type": "cart" }     { "type": "orders" }

See Push Notifications (FCM) for sending.

8. Testing checklist

  • Custom scheme (works now): adb shell am start -a android.intent.action.VIEW -d "bringo://product/42"
  • Website slug: open https://YOUR_DOMAIN.com/grocery/p/{slug} from another app (Notes/Messages) β€” it should open the product.
  • Order: https://YOUR_DOMAIN.com/account/orders/123 β†’ order detail.
  • Module switch: https://YOUR_DOMAIN.com/food β†’ app switches to Food and shows its home.