Android 应用程序在 Reliance JIO 4G 连接中不经常工作 [英] Android app is not working frequently in Reliance JIO 4G connection

查看:17
本文介绍了Android 应用程序在 Reliance JIO 4G 连接中不经常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Android 应用程序,它在除 Reliance Jio 之外的所有运营商的 WiFi 和 3G 连接中都运行良好.

I have an android app which is working completely fine in WiFi and 3G connection of all operators except Reliance Jio.

但是,我发现使用 Reliance JIO 4G 连接时,有时 android 应用程序没有连接到我的 HTTPS 网络服务,但是当设备连接时,同一组 HTTPS 网络服务可以完美运行,没有任何延迟到其他服务提供商.

However, I have found that Sometimes the android app is not connecting to my HTTPS web-services when Reliance JIO 4G connection is used, but the same set of HTTPS web-services are working perfectly without any delay when the device is connected to other service providers.

推荐答案

在提出请求之前,您应该检查用户是否有活动的互联网连接.

You should check whether the user has an active internet connection before making the request.

使用此方法检查互联网可用性,仅在返回 true 时才发出请求,否则,向他们吐司互联网不可用.

use this method to check internet availability only make a request if this returns true, otherwise, toast them internet is not available.

public static boolean isInternetAvailable() {
    try {
        InetAddress ipAddr = InetAddress.getByName("google.com"); //You can replace it with your domain name
        return !ipAddr.equals("");

    } catch (Exception e) {
        return false;
    }

}

这篇关于Android 应用程序在 Reliance JIO 4G 连接中不经常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆