You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some functionality or URIs are [different] if you're in an MSIX or not. The package flutter_local_notification offers a completely different experience in packaged vs non-packaged apps, for example.
A simple function like isMsix() would help determine at run-time whether MSIX package identity is available. The notifications package uses this function in C++:
#include<windows.h>// <-- This must be the first Windows header
#include<appmodel.h>
#include<atlbase.h>
#include<VersionHelpers.h>
std::optional<bool> NativePlugin::checkIdentity() {
if (!IsWindows8OrGreater()) returnfalse;
uint32_t length = 0;
auto error = GetCurrentPackageFullName(&length, nullptr);
if (error == APPMODEL_ERROR_NO_PACKAGE) {
returnfalse;
} elseif (error != ERROR_INSUFFICIENT_BUFFER) {
return std::nullopt;
}
std::vector<wchar_t> fullName(length);
error = GetCurrentPackageFullName(&length, fullName.data());
if (error != ERROR_SUCCESS) return std::nullopt;
returntrue;
}
Which can be translated to bool? isMsix() in Dart after some FFI. Happy to open a PR with this. Note that these functions aren't yet supported by package:win32, see halildurmus/win32#819.
❓ Platform
Windows
The text was updated successfully, but these errors were encountered:
💬 Description
Some functionality or URIs are [different] if you're in an MSIX or not. The package
flutter_local_notification
offers a completely different experience in packaged vs non-packaged apps, for example.A simple function like
isMsix()
would help determine at run-time whether MSIX package identity is available. The notifications package uses this function in C++:Which can be translated to
bool? isMsix()
in Dart after some FFI. Happy to open a PR with this. Note that these functions aren't yet supported bypackage:win32
, see halildurmus/win32#819.❓ Platform
Windows
The text was updated successfully, but these errors were encountered: