I need to check if internet accessible from the mobile or not in order to show a different view in my app.
My app is in react-native and I am using the plugin react-native-netinfo
for this. but this plugin pings google for checking the connectivity.
As Google is blocked in china I am getting is not connected though connected to internet. Is there any other site instead of http://google.com/generate_204
I can set the site name using the options provided:
NetInfo.configure({
reachabilityUrl: 'http://google.com/generate_204',
reachabilityTest: async response => response.status === 200,
reachabilityLongTimeout: 60 * 1000, // 60s
reachabilityShortTimeout: 50 * 1000, // 5s
reachabilityRequestTimeout: 15 * 1000, // 15s
});
I have tried using GitHub.com
that's also now blocked in China. Is there any reliable site that I can use for long term as well specially for China?
Note: can check whether site usable in china or not using: http://www.chinafirewalltest.com