Questions tagged [android-internet]

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

228 questions
9
votes
1 answer

How to handle java.net.UnknownHostException while using retrofit

I'm using retrofit to get and post data from the server. However, if my phone loses internet connection in middle of the app then I see error like this: 05-10 08:12:05.559 29369-29400/? D/Retrofit﹕ java.net.UnknownHostException: Unable to resolve…
Anthony
  • 33,838
  • 42
  • 169
  • 278
7
votes
1 answer

How MediaCodec finds the codec inside the framework in Android?

I am trying to understanding how MediaCodec is used for hardware decoding. My knowledge in android internal is very limited. Here is my findings: There is a xml file which represents the codec details in the android system . …
Whoami
  • 13,930
  • 19
  • 84
  • 140
6
votes
4 answers

Check Network and Internet Connection - Android

I was wondering if the method below check that I am both connected to a network, and can actually connected to the internet as well. Not just connected to a network that won't let me access the internet ? public boolean isNetworkAvailable() { …
spen123
  • 3,464
  • 11
  • 39
  • 52
6
votes
2 answers

Is wpa_supplicant for android device specific or android version specific?

I recently purchased sony xperia P, but it was not able to detect ad-hoc networks. After some googling I came to know that android does not support ad-hoc network and I haven't modified the /system/bin/wpa_supplicant file so that it can also show…
5
votes
2 answers

How to check if WiFi connection has internet on Android

I am trying to find a way to check if my current WiFi connection has internet. Using the usual option of ping or trying to reach a site won't work if I also have mobile data open because it will return true due to that.
theblitz
  • 6,683
  • 16
  • 60
  • 114
5
votes
3 answers

How to detect upload/download transfer rate in Android?

I am working on an app which uploads a large amount of data. I want to determine the transfer rate of the upload, to show in a notification. One post suggests using the WifiInfo which will not work for mobile data. Another post suggests getting…
user10655681
5
votes
1 answer

usb internet option unavailable kitkat - reverse tethering

I have Micromax Canvas A1 (android one) with Kitkat 4.4.4 stock android OS. Mine is an unrooted device & I want to use PC internet for downloading / surfing on my android device. Going by internet posts and videos they say that one should have 'USB…
dushyg
  • 131
  • 1
  • 9
5
votes
5 answers

Download Images From URL to SD Card

I am trying to create a very simple Image Downloading app. in which i want to download all images from this url to sd card: https://www.dropbox.com/sh/5be3kgehyg8uzh2/AAA-jYcy_21nLBwnZQ3TBFAea this code works to load image in imageview: package…
user3739970
  • 591
  • 2
  • 13
  • 28
5
votes
1 answer

Android checks if file exists in a remote server using its URL

I want my Android program to check if file (e.g. index.php) exists in a remote server using its URL. i.e. if I click the button, it should check if a url exists. If it does, it should load that same URL otherwise display a message "File does not…
Joy
  • 75
  • 1
  • 7
5
votes
1 answer

Slow data retrieval with android and parse.com

I am using parse.com to retrieve data for usage on my app. The problem is it takes about a minute for it to download, and it is just 4 small images (380x380) and a name. Here is my code: package com.favega.groups; import android.net.Uri; import…
4
votes
2 answers

Check internet connection throughout my application

I'm working on Internet based app,so i need to monitor Internet Connection. link I used this code in on create of mainActivity to check my internet connection it works fine. public boolean isOnline() { ConnectivityManager cm =…
shanmugamgsn
  • 820
  • 5
  • 16
  • 27
4
votes
3 answers

How to auto refresh webview after connecting to internet

In my app I have implemented a webview to show an webpage conataing some useful information. Now Initially I checked whether Netwotk is available or not. If availbale it will connect to webpage. If not, it will show an alertdialog, telling that no…
user8206380
4
votes
4 answers

Detect if android device is connected to the internet

this is my class that checks if the device is connected to the internet. import android.app.Activity; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.util.Log; import…
Caesar Krit
  • 204
  • 4
  • 19
4
votes
1 answer

How to wait for an IntentService to finish its task

I'm using an intent service to communicate with a server to get data for an app. I'd like the app to wait until the data it requests has been sent back (hopefully meaning that the IntentService the data has been requested from has finished running)…
bgenchel
  • 3,739
  • 4
  • 19
  • 28
4
votes
2 answers

Token authorization for an android app

I am trying to use secure web API from my Android app. The web API uses basic authentication and a the use of a server generated token. I have been able to use the web API using curl as shown below. Firstly, to authenticate the user and get the…
1
2
3
15 16