Questions tagged [android-internet]

This tag is used for internet related questions on the Android Operating System.

228 questions
2
votes
3 answers

Android Internet Connection timeout

I'm able to detect Internet connection using public class InternetDetector { private Context _context; public InternetDetector(Context context) { this._context = context; } /** * Checking for all possible internet…
2
votes
5 answers

Check Internet during SplashScreen

Well, after my SplashScreen screen. My app will check for an Internet connection. if there is internet available, it will call the WebView. Otherwise, it will call one Activity of error. But how do I pair to check the internet DURING…
2
votes
0 answers

Android check internet connection with ping test then display image view if true

Hello I've been reading up about checking the users Internet connection and majority of people are saying completing a ping is the best way to make sure a connection is made. Currently I can do a simple internet connection check, but ideally in my…
2
votes
1 answer

Why my service is not restart in some phone even return Service.START_STICKY?

public class MyService extends Service { @Override public IBinder onBind(Intent arg0) { return null; } @Override public int onStartCommand(Intent intent, int flags, int startId) { super.onStartCommand(intent,…
StuckPixel
  • 111
  • 8
2
votes
0 answers

HttpUrlConnection: How to know if connection started downloading or uploading?

In my Android app, I would like to change the icon in the notification bar to be different when the connection is uploading versus downloading. How can I intercept sending/receiving data in order to update the notification? I am using…
2
votes
3 answers

How to check Internet access at realtime?

I found a lot of topics how to check the Internet access. But I cannot understand how to make it dynamically. For example, I send a request (it will work in a some another thread) and device loses the Internet connection. How I can cancel my request…
Denis Sologub
  • 7,277
  • 11
  • 56
  • 123
2
votes
3 answers

Enable internet connection - Android Wear

I'm developing my first android wear application and I'm doing a request to an api, the problem is that I don't have internet connection. How can I enable the internet connection or something like that? so far what I have tried is enable the…
gon250
  • 3,405
  • 6
  • 44
  • 75
2
votes
1 answer

download data in byte[] in android

I want download data in a byte[] and when save it in a jpg file it's show image. I can do it but I have problem. if I use this code to download data it doesn't have any problem but in this case the download speed is low : String urlAddress =…
2
votes
3 answers

How to set time limit for waiting internet Connection in android AsyncTask?

I have use The AsyncTask For connecting Internet. a Progress dialog can show at onPreExecute() and i check is Online of that mobile if yes means it will execute the http connections code also dismiss the progress dialog at onPostExecute() and its…
2
votes
0 answers

Android ICS Emulator No Network Showing

In My emulator network is not showing, so that i'm unable to access internet... I enabled 2G Only in mobile networks no use, checked for Airplane mode I tried start emulator using this also no use \tools\emulator -avd -dns-server 8.8.8.8 and tried…
Pradeep
  • 2,530
  • 26
  • 37
2
votes
2 answers

How to check internet range continuously in background service?

I want to check whether internet is present or no continuously in background service so that I get broadcast as soon as the device gets connected to internet. Suggest with some snippets. Thank you.
2
votes
0 answers

kSOAP2 - Connection issues in Android on a GPRS network

I've been using the ksoap2-android library in a lot of my projects to use SOAP webservices. Why? Because I don't know any alternatives (maybe there aren't any). My problem? Their reliability on a GPRS/EDGE network (no 3G/4G where I live). Here is…
Asim
  • 6,962
  • 8
  • 38
  • 61
2
votes
1 answer

how to read and use the content of a website in android app

I actually have to read and use the content of some website in an Android app. I majorly e used two different codes till now to get the content of a website but they did not work for me public static String connect(String url) { String result =…
user2281330
  • 181
  • 2
  • 11
2
votes
0 answers

Turn on Packet Data in dual sim phone

I'm using this function for turning on the packet data: public static void setDataNetworkEnable(Context mContext) { try { ConnectivityManager conman = (ConnectivityManager) mContext …
2
votes
1 answer

Is it possible to get new permission for installed app by update?

I want to know is it possible to get new permission(say INTERNET permission) which was not given while installing app through android market but to get while updating. For example im giving free version of my app without ads, later after some time…
Vins
  • 4,089
  • 2
  • 35
  • 50