I’m developing a cross-platform app using Blazor MAUI. Everything works perfectly when I run the app locally on the Android simulator, iOS simulator, and even on my physical devices. I can access my API without any issues. However, once I released my app to Google Play for internal testing, the app fails to connect to the API and reports a connection failure.
The app is also released for testing in TestFlight for iOS, and it can access the API from there without any problems. This make me think that the issue seems specific to Android.
Here are some details about my setup:
AndroidManifest.xml:
I have set the internet permission:
enter image description here
network_security_config.xml:
I have created this file to allow my API domain:
enter image description here
If anyone else has encountered this problem with a Blazor MAUI app on Google Play/Android devices, your insights would be highly valuable. Any suggestions on what might be causing the connection failure or steps I can take to troubleshoot and fix this issue would be greatly appreciated.
Thanks in advance!
Verified that the INTERNET permission is set correctly in AndroidManifest.xml.
Created and referenced network_security_config.xml to allow cleartext traffic for my API domain.
Tested the app locally on Android and iOS simulators, and on physical devices, where it works perfectly.
Deployed the app for internal testing on Google Play, where the connection to the API fails.
What are you expecting?
I expect the app to connect to the API successfully when downloaded from Google Play, just as it does during local testing and on TestFlight for iOS. I’m looking for guidance on why this issue is occurring specifically for the Android version from Google Play and how to resolve it.
flaxx is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.