# Send users to the appropriate app store for an update

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

DeeplinkX 1.5.8.

After your application determines that an update is available, offer a store-selection action. The existing example uses Telegram's published package metadata to demonstrate this flow; replace those destinations with the identifiers for your own application.

## Reusable Flutter example

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

Future<bool> openTelegramUpdateStore() {
  return DeeplinkX().redirectToStore(
    storeActions: Telegram().storeActions,
  );
}
```

For a manual choice, pass the selected `StoreOpenAppPageAction` to `DeeplinkX().launchAction(selectedAction)`. The existing UI uses `showLaunchSelector` from its own example code; that helper is not exported by the package.

## Current example behavior

The `UpdateAppPage` builds five choices from `Telegram().storeActions`, in this order:

1. Google Play: package `org.telegram.messenger`.
2. Huawei AppGallery: package `org.telegram.messenger`, app ID `C101184875`.
3. iOS App Store: app ID `686449807`, app name `telegram-messenger`.
4. Microsoft Store: product ID `9nztwsqntd0s`.
5. Mac App Store: app ID `747648890`, app name `telegram`.

Automatic selection filters these actions to the current platform, tries matching native store actions in order, and stops at the first successful handoff. Internally it disables fallback for these attempts. It returns `false` if no matching native store action launches; it does not automatically open a browser listing.

Manual choices use ordinary `launchAction`, so a listing's documented browser fallback can be attempted. The selector keeps options visible even when a store is unavailable natively and shows its availability separately. Launch controls prevent repeated concurrent requests.

## Configuration and limits

- Configure the selected store schemes and Android visibility declarations 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) as examples. Replace demo identifiers appropriately.
- This recipe does not compare versions, query an update service, download an update, or install it. The sample “Telegram version 12.0” card is illustrative copy, not a verified current release announcement.
- A successful Boolean means a launch request succeeded. It does not mean the application was updated.
- This page remains in the use-case collection even though the hub has no `/updates/` news section.

## UI behavior

- Automatic passes Telegram's five store actions in the documented order and filters by current platform.
- Two matching Android stores can be attempted in order; an absent native store must not be counted as a browser success by Automatic.
- No matching or successful native destination returns `false`.
- Manual listing selection can use its documented browser fallback.
- Test repeated taps while a request is pending and show the final handoff result.

## Source code

- [UpdateAppPage, `_options`, `_showStores`](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/example/lib/use_cases/update_app_page.dart)
- [Telegram store identifiers and order](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/downloadable_apps/telegram.dart)
- [`redirectToStore` and `launchAction`](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/core/deeplink_x.dart)

[All use cases](/deeplink-x/use-cases/) · [Rating destinations](/deeplink-x/use-cases/rate-review/) · [Promoted app links](/deeplink-x/use-cases/promoted-app/)

