connectivity

Detecting “use only 2G networks” setting

寵の児 提交于 2019-12-03 08:11:14
Is there a way of returning the value of Android's mobile network setting for "use only 2G networks"? The app being developed measures the internet speed at a certain location, but in order for this to be relevant, it must know if the user is deliberately restricting mobile internet to 2G. I've taken a look at ConnectivityManager, but it only provides information about the background data setting or all networks. Iterating through them reveals that despite the setting being enabled, HSPA and UMTS return true for isAvailable() : for (NetworkInfo netInfo : cm.getAllNetworkInfo()) { Log.i(TAG,

Is it possible to detect LTE connection using iOS SDK?

空扰寡人 提交于 2019-12-03 00:31:12
I'm using the reachability API to detect my current connection, but I can only distinguish between WIFI and 3G. I get the following flags: LTE: kSCNetworkReachabilityFlagsIsLocalAddress|kSCNetworkReachabilityFlagsIsWWAN|kSCNetworkReachabilityFlagsTransientConnection|kSCNetworkReachabilityFlagsReachable WIFI: kSCNetworkReachabilityFlagsIsDirect|kSCNetworkReachabilityFlagsReachable The problem is that LTE returns the same flags as a 3G connection. Is there any way to determine whether the user currently has LTE or 3G? As of iOS 7, you can find this out using the currentRadioAccessTechnology

ConnectivityManager.CONNECTIVITY_ACTION get network disconected from in API >= 14?

孤街醉人 提交于 2019-12-03 00:23:32
I need to get the network from which device was disconnected. Now I use: NetworkInfo ni =intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); And check: ni.isConnected() if this returns false ni - is the network from which the device was disconnected. But ConnectivityManager.EXTRA_NETWORK_INFO is deprecated in API 14. Google says use getActiveNetworkInfo() to get network information. But getActiveNetworkInfo() always returns network with which the device is connected now ( isConnected() must return true)! How do I get the network info for the network the device disconnected from

Objective-C/iOS: Keeping bluetooth connection alive in the background

淺唱寂寞╮ 提交于 2019-12-03 00:14:11
I've been researching this for a couple of days now and looks like it's not possible to keep bluetooth connection alive while the phone goes to sleep or if the app is in the background. However, I have found one app that claims they can run all the time: RunKeeper app says: What's New In Version 2.5.1.0 Support for tracking heartrate in the background with Wahoo heartrate monitor. Does anyone know how they manage to send heart rate data to the phone while the app is in the background? UPDATE: Got it working by adding an entry in my plist under "Required background modes" for "bluetooth-central

database connectivity fails after creating jar file

柔情痞子 提交于 2019-12-02 18:52:00
问题 I created a project with notepad.And running well in cmd with mysql server database. But after creating a jar file of same project then jar file is not able to connect to the server database.so don't know what to do next? Even though other systems (only installed java not mysql) are unable to connect to the server database after running from either cmd or jar file. Is it necessary for every systems to have java and mysql installed on other systems to run? How to overcome from such problem. I

Zabbix Monitoring Tool Database Connection issue

空扰寡人 提交于 2019-12-02 10:27:18
I am trying to install Zabbix Monitoring server on Linux Cent OS 6.x. I have installed Zabbix 2.4 version on it. I have followed the following article of Zabbix to configure it: https://www.zabbix.com/documentation/2.4/manual/installation/install_from_packages Once I reach at IPAddress/zabbix at browser settings, I have successfully passed PHP settings and configuration stage. But, when I go to next steps where I have to apply database settings, it is not working. However, I have created required database with permissions, and imported schemas too. I have checked all required services and they

Android: How to check if Google is available?

最后都变了- 提交于 2019-12-02 02:35:06
问题 Can someone provide better and faster way to check if Google is available in Android? I have observed that connectiontimeout doesnot stop in given time_out. rather it takes more than a minute.. public static boolean isConnected(Context context){ NetworkInfo info = Connectivity.getNetworkInfo(context); return (info != null && info.isConnected()); } public boolean checkInternetConnectivity() { try { HttpURLConnection urlc = (HttpURLConnection) (new URL( "http://www.google.com").openConnection()

Android: How to check if Google is available?

折月煮酒 提交于 2019-12-02 01:56:58
Can someone provide better and faster way to check if Google is available in Android? I have observed that connectiontimeout doesnot stop in given time_out. rather it takes more than a minute.. public static boolean isConnected(Context context){ NetworkInfo info = Connectivity.getNetworkInfo(context); return (info != null && info.isConnected()); } public boolean checkInternetConnectivity() { try { HttpURLConnection urlc = (HttpURLConnection) (new URL( "http://www.google.com").openConnection()); urlc.setRequestProperty("User-Agent", "Test"); urlc.setRequestProperty("Connection", "close"); urlc

Broadcastreceiver to obtain ServiceState information

血红的双手。 提交于 2019-12-01 18:46:48
Does anyone know of a way to obtain the phone service state (IN_SERVICE, OUT_OF_SERVICE, EMERGENCY_ONLY, POWER_OFF) in android. I was hoping there would be a broadcastreciever to identify the changes, but I can't find anything. I know there's a listener but I'm not sure how I would use that from my app as it runs as a service using a WakefulIntentService (by thecommonsguy). With something like battery level (ie BATTERY_LOW, BATTERY_OKAY) it's quite easy, but I just can't work out a similar things for phone service changes. Register a receiver for public static final String ACTION_SERVICE_STATE

Testing connectivity issues in Windows Phone 7 (using the emulator)

戏子无情 提交于 2019-12-01 15:08:04
问题 Is there a way in the Windows Phone 7 emulator to turn off the network connection (without yanking the cable and turning wi-fi off on my laptop)? I want to test the dropping of network connectivity without having a physical device or doing anything physical outside the emulator or the Windows Phone 7 SDK/Tools. 回答1: As an alternative to physically disabling the network connection I also, sometimes, find it useful to redirect the network connections through Fiddler2. It's then possible to use