Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

How to detect the APP is block internet or not by firewall(2/3/4G network)

$
0
0

Hi, I face an issue that when my phone close the WiFi and turn on the 3/4G, when 3/4G network connected, i call function which will access an external API, my APP will crash!

i found there was a popup dialog "ABC application(my APP name) is blocked to access internet.", a button "Allow" show beside.
this dialog only can be see in debug model, and will be auto hidden in a few secends...

Crash come from this line:
AuthenticationResult authenticationResult = authenticationContext.AcquireTokenAsync(aadResource, credentials).Result;

My questions:
1) Is there any way to check the APP can access internet throught 2/3/4G(The phone alreay can access internet under 2/3/4G).
2) How can i call those dialog(use C#) which ask me is allow this APP can use 2/3/4G to access internet?

CrossConnectivity.Current.IsConnected; --> this plugin can only check the phone vs internet status, i need something check the APP vs internet status

i am new in Xamarin world, my APP just enabled Android, no IOS and Win phone, and current work fine in WiFi model.

Thanks in advance!


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>