# Create a platform-aware promoted-app store link

Canonical HTML: https://p-hatan.com/deeplink-x/use-cases/promoted-app/

DeeplinkX 1.5.8.

A promoted-app card can keep platform-specific store destinations together and ask DeeplinkX to choose the matching store action. The sample promotes Instagram with illustrative campaign parameters.

## Reusable Flutter example

```dart
import 'package:deeplink_x/deeplink_x.dart';

Future<bool> openPromotedAppStore() {
  return DeeplinkX().redirectToStore(
    storeActions: [
      PlayStore.openAppPage(
        packageName: 'com.instagram.android',
        referrer:
            'utm_source=deeplink_x&utm_medium=example&utm_campaign=summer_launch',
      ),
      IOSAppStore.openAppPage(
        appId: '389801252',
        appName: 'instagram',
        campaignToken: 'deeplink_x_example',
        providerToken: 'example_provider',
        affiliateToken: 'example_affiliate',
        uniqueOrigin: 'use_cases',
      ),
    ],
  );
}
```

Replace demo tracking tokens with the values appropriate to your own authorized campaign and store accounts. Use tokens issued for your own campaign.

## Current example behavior

`PromotedAppPage` retains the Android and iOS actions in one list and calls `redirectToStore` from its CTA. The widget does not contain platform-selection branches; the utility filters actions by `store.platform == currentPlatform`.

The utility tries only matching native store actions, with fallback disabled, in supplied order. It returns `false` when no matching native store action launches. Platforms with no configured matching action do not receive a generic browser destination through this utility.

For a browser fallback, add an explicit listing URL launch in your application after native selection fails.

## Configuration and limits

- Compare the [Google Play implementation](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/app_stores/play_store.dart) and [iOS App Store implementation](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/app_stores/ios_app_store.dart) for the exact accepted action parameters.
- Configure the relevant store package and scheme visibility using the [Android manifest](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/example/android/app/src/main/AndroidManifest.xml) and [iOS Info.plist](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/example/ios/Runner/Info.plist).
- Tracking fields are URL inputs. Their presence does not implement conversion analytics, guarantee attribution, or earn affiliate credit by itself.
- A successful Boolean describes a native store handoff, not an installation or conversion.

## UI behavior

- Android receives the Play Store action with the entire referrer string preserved.
- iOS receives the configured campaign, provider, affiliate, and origin tokens.
- Action ordering and current-platform filtering remain intact.
- A missing store or unmatched platform returns `false` without an undocumented browser success.
- Duplicate taps cannot start concurrent redirects; feedback accurately describes the final handoff result.

## Source code

- [PromotedAppPage, `_actions`, `_openPromotion`](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/example/lib/use_cases/promoted_app_page.dart)
- [`redirectToStore`](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/core/deeplink_x.dart)

[All use cases](/deeplink-x/use-cases/) · [App-update store selection](/deeplink-x/use-cases/update-app/) · [Rating destinations](/deeplink-x/use-cases/rate-review/)

