Is there a simple android app that will log the internet connection? - android

I have issues with Zoom freezing and I would like to ensure that it is not the WiFi connection dropping out. I am looking for a simple app that would check the internet connection via ping for example. A time stamped graph of the internet connection would be the result. Any suggestions?

Related

How to detect host reachability in android?

In IOS we have implemented using Reachability framework which provided by apple, In Android We need to find whether active internet connection is available are not. Actually We need find whether Wi-fi connected with active internet connection or not, We have tried lot of ways but we need to deduct instantly. In this case we should find out host reachability status of internet connection. We have tried this below link .
It was taken some time for the response, But we need to get instant response to finish the requirement. We need to solve the case, device connected with Wi-Fi but doesn't have internet connection. If anyone know the solution help us. Thanks in advance.
In Android, you can subscribe to get a notification when it WiFi has connected. This is as instant as you are going to get.
ConnectivityManager will also allow you to poll to see if WiFi is available, but it's much better (and more battery friendly) to get an event.
See here for details

Android application, listening to streaming radio. No internet or mobile data bug

http://pastebin.com/G4UrTT7Z
What can I do to check for a working internet connection?
Or how do I check if connection is lost?
Can someone help me with this ?
I suppose this is a IOException. I am not sure. When watching logcat and console I don't see any exceptions or forcecloses.
My source code is posted on pastebin.
One way is to read a well known site content with URL connection. If you can read it, then it means you have an Internet connection.
Other is to connect to your radio station site: this has double requirement: you have Internet connection AND the radio station site is up.
Maybe both of them will block you, if you read too often!
There is android buggy API to read the network state and suck, but if you connect to WIFI , then you will have the Connected state from API even if your WAN cable pulled out...

Android force traffic over internet while WiFi enabled

I'm starting to write an Android application to perform background monitoring of my web server. With WiFi enabled a problem will be that traffic is directed over that by default, I'd like to always use 3G for the HTTP request to check external availability as well. I know I could use this code to disable WiFi programmatically:
WifiManager wifiManager = (WifiManager)getBaseContext().getSystemService(Context.WIFI_SERVICE);
wifiManager.setWifiEnabled(false);
But as it will be running in the background it's a bit clumsy and will interrupt other operations over WiFi while the check is in progress. Looking at the Socket Documentation I can't see any apparent way to achieve this. I'm wondering if there's any supported way to achieve this on a non-rooted phone? I have full control over the server so the protocol doesn't specifically have to be HTTP.
This seems like it would be an awfully dangerous feature for Android to allow.
What about users who are on metered 3G plans? How would they feel if an app forced them to use a 3G connection and then bugged out or something and blew away their whole data quota without them even knowing it (thinking they were on WiFi)?
Also, there could not be more than one active networks at a time.
Possible Resolutions-
What you can do is to force disable the wifi network, when your application is active and then enable it later.
Also, Try searching for a method called requestRouteToHost. It allows you to specify the network type and the host you want to find a route to.
I don't believe you can do this in android since only one network connection is active at any given time. A similar question is posted here as well:
Send HTTP request through 3G network without using WiFi?

Force internet connection attempt?

I have a service which polls every hour attempts to sync data automatically to the web from the device.
I have it working but I need to find a way to establish an internet connection if there is not one available.
For example - If my phone is in standby mode (screen locked for a period of time) the internet connection is dropped and it is unable to sync when it needs to.
I would like to attempt to connect via wifi if available, then using 3G if required.
Is there a reliable way to do this?
UPDATE -
I found an article online which uses this code to attempt connection via 3G if there is no wifi available :
int resultInt = connectivityManager.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE, "enableHIPRI");
unfortunately it doesn't seem to work on all devices, maybe I need to try other options than "enableHIPRI" ??
Any ideas?
OK, although I haven't been able to solve this problem I have discovered that the main cause for the delay in between sync attempts is because the cpu gets stopped during sleep mode, this means my timer task was paused..
My workaround was to rewrite the service using a wakeful intent to get around the timer issue.
This makes my solution much more reliable so I am closing this question! :)
You should be able to do most of that using ConnectivityManager. It allows you to query the available types of networks and using requestRouteToHost you should be able to ensure there's a connection set up that you need for syncing.
I think you cannot rely on such thing on mobile phone, as in any embedded device you cannot be sure if the device will connect and stay connected when you want. You can only leave a message for the user that data was not synchronized or try to minimize it by checking if there is connection and then synchronizing not just in one hour.

Bluetooth Discovery stall internet connection?

This strange thing just happens: whenever a startDiscovery() is called, the application is (as you would expect) still responding during the next initial 10-12 seconds. But whenever a Http Request is fired during this period it is stalled (no data could be requested or downloaded on a http connection).
I use the DefaultHttpClient.execute() method to request data from over the wifi network.
I not only see this happening in my own application. I also see this when the application is doing bluetooth discovery in the background and I want to download something off the Google Market place.
Had someone experienced something similar?
UPDATE 18-aug-'11:
When listening to a stream on the internet: I noticed the stream was dropping out on me whenever discovery was activated. I looked at the active network traffic and indeed I could confirm the two drops. The things that wonders me, as this was the network traffic from my computer and not my android device. Soo it seems the android devices somehow conflicts with the active wifi network?
Anybody familiar with this?

Categories

Resources