Open mdobric opened 2 years ago
This happens when an app attempts to launch my app as well. Was working previously but seems to have stopped after my tablet (Galaxy Tab A SM-T510 Android 11) was updated to the latest One UI version - 3.1 or I updated to Visual Studio 2022 17.0.5.
I can also reproduce it on a Google Pixel 4a running Android 12
Is that more related to the new "query" attribute required for app targeting api 30 ?
https://medium.com/androiddevelopers/package-visibility-in-android-11-cc857f221cd9
Duplicate of #1958
I can confirm this is still an issue in VS Version 17.5.0 Preview 1.0 using Android API 30 emulator.
await Launcher.CanOpenAsync("https://google.com"); returns false. but await Launcher.OpenAsync("https://google.com") opens a browser and goes to google.com.
I think this is due to the android os. You will need the query things as mentioned by @softlion
This is definitely still a problem:
on
A workaround seems to be wrapping the Launcher.OpenAsync(uri) method in a try/catch instead of checking "CanOpenAsync".
Description
On Android, Launcher.CanOpenAsync() returns wrong value for Google Maps URLs when targeting API level 30 (Android 11). This works fine when targeting API level 29.
Steps to Reproduce
Expected Behavior
Output should be
Actual Behavior
Basic Information