hasPackageIdentity static method
Returns whether the current app was installed with an MSIX installer.
Using an MSIX grants your application package identity, which allows it to use certain APIs.
Specifically, using an MSIX installer allows your app to:
- use FlutterLocalNotificationsWindows.getActiveNotifications
- use FlutterLocalNotificationsWindows.cancel
- use custom files for notification sounds
- use network sources for notifications
- use
ms-appx:///
URIs for resources
These functions will simply do nothing or return empty data in apps without package identity. Additionally:
- WindowsImage.getAssetUri will return a
file:///
orms-appx:///
URI, depending on whether the app is running in debug, release, or as an MSIX. - WindowsNotificationAudio.asset takes an audio file to use for apps with package identity, and a preset fallbacks for apps without.
Implementation
static bool hasPackageIdentity() => false;