Android :: Best Approach For Requesting Data (internet Connection)
Sep 28, 2010
I have an app in which there are several requests to a server in internet (http), for example to retrieve images in threads outside the main UI process. The thing is that I have a Thread that manage the request with a while(!end) loop and in the end a Thread.sleep(500) that checks if there are new unhandled requests. As I read here [1] I know that this is not a good practice. And users have complain about ANR (app not responding) in several cases.
Knowing that obviously I want to refactor all the way my app manage the requests and I want to do that the best way. So, the question is; what is the best approach for doing this? A service? a broadcast receiver and send intents when I need a request to be handled?
View 6 Replies
May 29, 2010
i just picked up a unlocked a moto cliq.. my concern is that i have never had a data plan on my account (at&t). this phone seems to have alot of different apps and widgets updating themselfs continuosly.. i have no problem with while im at home beacuse of my wifi that i can connect to.. but when im not on a wifi connection it seems to still be updating.. which i dont want until i upgrade my plan to unlimited data.. How do i turn off these features or turn off data/ internet acess all together when im not on a wifi connection?
View 4 Replies
View Related
Nov 24, 2009
I've had a Hero for a few weeks now, and while most things are great, I'm finding the internet connection very unreliable. For example, if I try to use the browser to view a website, often it says it can't find the page, even for www.google.com, and this is using a bookmark so I know it's a valid address. Often in the Market, it says it doesn't have a connection and to retry or cancel.
I am usually connected via wi-fi, either at home or at the office, so I know the wi-fi connection is good, and both have been tested thoroughly with my iPhone 3G. It's almost as if I have to wait for something to happen before I can use the net, but I make sure the wifi signal symbol appears before I try anything. Why could my data connection be so unstable?
View 11 Replies
View Related
Sep 26, 2010
Took my HTC Desire to Italy and since then have lost all mobile data connections - though works fine on WiFi. Switched on airplane mode for flights, and switched off data roaming to reduce overseas costs. But when switched back on to use internet couldn't get any network connection. Now back in the UK still same issue - no internet, and cannot send MMS picture messages - even when in strong 3G signal Tried all the options I can find but no joy at all.
View 4 Replies
View Related
Jul 1, 2010
Unbranded, fully updated (2.1-update1), Desire. Three months old. No task killers installed. Just this past couple of days I've noticed it has not been showing the data connection symbol in the top bar, next to the signal strength bars. Try and connect to the internet or the market and get a 'failed' pop up window asking to either retry of cancel. Retry never works.
I go into settings > Wireless & Networks and disable Mobile Network, then enable it again and it flickers on then goes off again. Repeat this and it stays on for a while but always goes off again after about 20 minutes even though the Mobile Network is ticked green. Why is this happening? I'm missing emails because of this and it's a bit of a pain.
View 11 Replies
View Related
Apr 15, 2012
I have a Samsung Galaxy S2 with Android 4.0.3 XXLPQ.It's rooted and now has CM9 installed.Unfortunately for some bizarre reason I have no internet connection. I've installed a different modem and it hasn't fixed the issue. APN settings are correct (I've spoken to my network). Sometimes it works absolutely fine then after a few moments it just won't load anything and I get a 'No internet connection' warning. Apps won't work either due to no connection. However I do have a 'H' and sometimes '3G' next to the signal bars. WiFi is working fine. Have full signal.. I've started from scratch and wiped everything several times and re-flashed xxLPQ but still nothing.
View 1 Replies
View Related
Aug 26, 2010
Currently using launcherpro as default but having a little problem with my data connection. Do you guys leave mobile internet on then use a data connection toggle like on switch pro to enable disable as and when you like? Or do you use a toggle like curvefish apn to rename and automatically connect to the network? Or do you turn it on and off via settings or the power button as and when you need it? Bit lost on the subject to be honest. Also when I go and turn mobile internet on in the settings under it it says something like connect to mobile internet when WiFi is unavailable. Is this the default setting or can it be changed to only connect when I want it to?
View 6 Replies
View Related
Sep 10, 2010
I would like advice from those with 2.2 on Orange. I've had my Desire for 2 months now and love it-apart from one thing-the damned Internet connection. Quite often, with a strong 3G+ (HSDPA) signal, my internet connection fails to load data. Then, a few minutes later, in the same location, it works perfectly. I know for a fact that this is not a network only problem. The reason I know this is because I previously used the exact same SIM in my iphone for 6 months in the very same locations and it always worked perfectly.
Therefore, my strong suspicion is that the problem is a result of the combination of the Orange branding on a Desire and the network itself. I'm sure I read of a couple of posters here who had the very same problems and when they moved to 2.2 the problem disappeared. Can anyone confirm? I've been waiting patiently for the Orange update to 2.2 but am getting fed up and I'm concerned that the Orange bloatware may still cause an issue after this. Hence, I'm considering a debrand and update myself.
View 3 Replies
View Related
Nov 18, 2010
I'm just trying to work through my phone after updating to 2.1, it's like having a new phone and starting all over again! On the new 2.1 if you got to Settings, Wireless and Network, Mobile Networks....the top two are "Data Roaming" and "Date Traffic". Is DATA TRAFFIC equivalent to the Internet/MMS application on 1.6? If I click Yes to Data Traffic it warns me that "addtional charges may apply....." etc etc. I didn't get that warning on 1.6? Is this just the standard internet connection?
View 3 Replies
View Related
Jul 13, 2010
We are supposed to cache textual and audio data in our application until device is booted or maximum of two days, whichever happens earlier. To get a perspective on data to be cached, note that we are to store about 200 text headers containing around 10 fields, each of length 30 bytes and about 20 sound files each about a minute long.We are getting the textual data by parsing XMLs and then we keep them in ArrayLists. The sound files are directly written inside the app storage using File I/O (and not on SDcard or Apps Cache directory).This application is to be run on devices running Android 1.5 or later.I understand, and please correct me if I am wrong, that we can cache the files either on SDcard or inside the application or inside applications Cache directory.
View 2 Replies
View Related
Jan 16, 2010
I am developing an Android app that needs to communicate bi-directionally with a server. By that, I mean either the server or the device can send a message at any time, with an arbitrary amount of time in between messages. Sending data from the device to the server is a common and I think well understood task, but I'm not as sure what the best approach is to go in the opposite direction from the server to the device.
I think having the device periodically poll the server may be a bad idea due to latency and the drain on the battery, but I'd be willing to consider this option. My plan at the moment is to send text messages from the server via an email-to-SMS bridge, and to have my app run a service to receive and handle these messages.
The question I have is if there are any best practices for this scenario, and if using text messages has some downsides that I have failed to consider. For the sake of this question, I want to assume that users have an unlimited text data plan, so paying per text won't be an issue.
View 2 Replies
View Related
Jul 23, 2010
What's the technical term for being able to have voice connection and data connection simultaneously? Like AT&T was promoting heavily for a while.Apparently, the new T-Mobile Vibrant has this capability. A friend got one and was accessing the web while talking to me, double jealous now.I have benn lusting after the Verizon version, Fascinate, and wondering if there is any chance it will as well.
View 2 Replies
View Related
Mar 15, 2010
I am building an application for Android (1.5) that, after quering a webservice, shows to the user a big amount of data that should be displayed in a "grid" or "table" style.
I must show a result of about 7 columns and 50 rows (for example a customer list with names, addresses, telephone number, sales amount last year and so).
Obviously, the 7 columns will not fix in the screen and I would like the user would be able to scroll up/down and LEFT/RIGHT (important because of the number of columns) to explore the grid results.
cell selection level is NOT necessary, as much I would need row selection level.
What is the best approach to get this interface element? Listview / GridView / TableLayout?
View 5 Replies
View Related
May 13, 2010
I have made an App that can connect to a program that I am running on a server, but it only seems to work with WiFi. When I try to use 3G it doesn't make the connection. Is there something special that I have to turn on or set in order to use 3G?
View 6 Replies
View Related
Nov 22, 2010
I have work on Application That use Internet.
It contains XML parsing from url. than Showing Progress Dialog While parsing time. Stop dialog when parsing is done. set TEXT(Data) in ListView.
My issue is that, When device is connected to internet than my Apps works fine But when Device is not connected to internet "Progress dialog" is running for infinite time. I want to stop dialog if device is not connected to internet or wifi. how to do this? I have change my mind i want to check internet connection when i click on button. what i have tried so far is..
CODE:...................
But this is not working.if device is not connected to internet than i want to show AlertDialog. otherwise it will start Activity.
View 3 Replies
View Related
Jun 7, 2010
I'm looking for an alarm application. I would like the alarm to play a podcast rather than sound an alarm. That way I can wake up to something a bit more interesting than a monotonous beep!
I've tried 'Appalarm', but can't see how to make that work with a podcast. 'News Alarm' is close, but I don't want to dismiss the alarm before I hear the podcast - the whole point is that the podcast will rise me from my sleep gently. Bit like a very simple 'old skool' radio alarm that you can buy from ebay for $1. Makes you wonder why my $500 phone can't do the same thing... (technological progression etc.)...
View 1 Replies
View Related
Aug 20, 2010
In my application I must use the internet connection ,so I check it first before I open an URL connection using this :-
public boolean IsConnectedToNetwork(ConnectivityManager conManager) { NetworkInfo allNetworkInfo = conManager.getActiveNetworkInfo(); NetworkInfo currNetworkInfo; boolean anythingConnected = false; for (int i = 0; i < allNetworkInfo.length; i++) { currNetworkInfo = allNetworkInfo[i];
if (currNetworkInfo.getState() == NetworkInfo.State.CONNECTED) { anythingConnected=true; }
}
return anythingConnected; }
However this code runs well when I connected to either the operator internet Or to a Wi-fi network. But when I'm connected to the operator but without credit and no internet the mobile also sees it as there's internet,or even connected to a Wi-fi network but without internet gateway it also sees as if it's connected to the internet.
View 12 Replies
View Related
Aug 20, 2009
What is the simplest way to check whether my app can access the internet? I am using some APIs that use the internet, but they crash if there is no connectivity. So I just want to check if there is internet access by any means.
View 13 Replies
View Related
Jan 3, 2010
when i plug my phone to htc sync, is there any setting that grant me Internet connection as well? phone data is switch off, wanna make use of the pc to access Internet. just like window mobile active-sync which allow device to connect to Internet via the PC connected via.
View 2 Replies
View Related
Oct 27, 2010
I am a newbie to Android so please excuse me if this is a silly question or one that has been answered many times before. When connecting to and using the Internet, I am trying to find out what determines the connection that the phone will use when more than one connection is available: Wifi, 3G etc. Is there a standard priority order for connection and use? can the user set the priority order? Usually I would expect the wifi connection to be preferred for reasons of speed and cost. I have looked at my phone user guide and the official Android user guide but cannot find any information about this.
View 4 Replies
View Related
Aug 13, 2010
I recently moved to an area that has limited internet choices which in turn makes for higher internet prices and longer contracts. A friend suggested a droid and tethering it using pdanet to my Mac. I use my internet primarily for browsing, sometimes I'd like to watch hulu or small pdf files through e-mail. Would this be a good option to consider or should I go with an internet connection? If I choose a droid, which one is the best one for tethering? I'm somewhat drawn to the ones with touch screens and no keyboards....but will listen to your reviews.
Supposedly verizon has a bandwidth limit of 5gb. Anyone know if that is monthly? How much is 5gb? Am I going to find myself a month out hating that I made the choice to rely on a droid for my primary internet source? Is there anything else I need to know about tethering a droid to my mac? Are there restrictions for OS X? Is there anything else I should know so I don't get the phone and hate myself later?
View 4 Replies
View Related
Nov 11, 2010
i have this android application that requires to load data from a remote server via the internet. this update-functionaliy obviously requires the device to not only be connected to some kind of network, but also to the internet.so: is want to schedule the update-service to some date and when it starts, it should determine whether it actually CAN reach the target server or not. therefore, a simple "is the device connected to wifi?" does not suffice, as the device may be connected to a wireless network that does not offer internet access. something like a PING is required.whats the easiest / best way to determine, if there is an internet connection is available i.e. server is reachable?
View 3 Replies
View Related
Mar 31, 2010
How can I check got a successful Internet connect (Wifi/3G/whatever else) I already display an error to the user if they don't have Wifi connection but how can I make sure then that the user does got 3G connection if they wish to connect to use the application without the Wifi connection?
View 1 Replies
View Related
Aug 12, 2009
I'm basically trying to check that the device is connected to the internet to that I can access and parse an RSS feed. This is also the 1st android app I have written so I'm still finding my way around so any help/advice would be appreciated. I'm sure the variables should be assigned to something but I don't know what. The classes don't appear to have public constructors so I can't do "WifiInfo info = new WifiInfo()".............
View 5 Replies
View Related
Jun 6, 2010
Is it possible for Android to connect to Windows ICS (Internet Connection Sharing) via WiFi?I have set up Windows ICS (Internet Connection Sharing) on my Windows XP laptop WiFi adapter. The connection is open with WEP disabled.From a Windows Mobile 6 PDA I am able to see various WiFi routers, my laptop ICS and connect to the laptop ICS.From Android I am only able to see the various WiFi routers, but not the laptop ICS connection.Does the Windows ICS use some special Microsoft protocol that the Android WiFi adapter can not detect?Is there some other Android software or app that can connect the Windows WiFi ICS?
View 4 Replies
View Related
Jul 15, 2009
I own an HTC Magic and am about to go travelling around my country.
I have the 3g connection on the magic and want to know if I can share it somehow to my laptop using a wireless network or the usb data cable. I would love to be able to surf the net on my laptop using the phone as the modem!
Does anybody know if this is possible - what apps I need and how to do it!
View 10 Replies
View Related
Mar 3, 2010
I have just got my Motorola Milestone ready and working. I have set up the Internet carrier APNs (HSDPA, EDGE, 3G etc) and I wonder if it is possible that Android asks me for confirmation when connecting to one? I don't like the idea of changing the APN name to cheat/workaround it (to make it impossible to connect by setting up non-existing APN), I like to see what connection possibilities are around me. When I'm at home I have a WiFi and also would like to be sure the whole transfer is being done by WiFi, not EDGE. With each connection request confirmation I'd be sure I have it under control.
View 2 Replies
View Related
Nov 15, 2009
How can I determine the current internet connection type available to an Android device? e.g. have it return WiFi, 3G, none.
View 2 Replies
View Related
Jun 18, 2010
I would like an app that can control my internet/3g connection in a time schedule. For instance turn off the internet at night when I don't use it and turn it on again the morning.
View 4 Replies
View Related
Jun 21, 2010
Now that the iPhone also got the official Windows Live Messenger from Microsoft, is there a way to ask MS to also make one for the Android platform?
View 1 Replies
View Related