Android application in Release requires permission whereas Debug does not
See original GitHub issueDescription
Although internet connectivity check is used, resources on the internet cannot be accessed when in Release build on android. Works fine with the exact same code built and run on Android Debug and Windows Release and Windows Debug configurations.
Example:
- for a DB call, SqlException class 20 is received which normally occurs in EF Core when internet connectivity is not available
- when using a HttpClient to download sample HTML from google.com it outputs:
System.AggregateException System.Net.WebException One or more errors occurred. (Permission denied (missing INTERNET permission?))
I cannot see output details because of Android application is running (debug is disabled in android project properties).
Are permissions bypassed on Android in Debug configuration? P.S. What would, please, be the preferred and clean way to acquire permissions in RC 2 for MAUI in general and also for MAUI Blazor - e.g. access camera from BlazorWebView? Is there any general cross-platform way or do permissions really have to be declared in Android-specific classes and files in the project?
Steps to Reproduce
- MAUI Blazor app run on Android in Release build configuration
- access the internet
Version with bug
Release Candidate 2 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 11 (API 30)
Did you find any workaround?
no, I cannot install Debug build on clients’ phones
Relevant log output
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Yes, this is the same as with xamarin android and .net 6 android… debug auto adds this as it is needed for debugging, however IMHO i think we should add it to the templates. @jonathanpeppers @Redth thoughts here… i really think this is going to bite people
Agreed @jonathanpeppers and it is easy to remove (harder to miss if not there) and doesn’t hurt anything as it isn’t like that comes up in permissions or anything you know.