Tagged Questions
0
votes
1answer
43 views
Android HttpClient FATAL EXCEPTION: AsyncTask #1 using BitmapFactory
I'm having a FATAL EXCEPTION: AsyncTask #1 while trying to upload an image to a webserver From an Android App. I'm using Bitmap and BitmapFactory to encode the image.
@Override
protected Void ...
1
vote
0answers
54 views
Android AsyncTask connection refuses emulator + Mamp
I want to read JSon from a local web server in my android Application.
This is my code :
public class MainActivity extends Activity implements OnItemClickListener {
HttpClient client;
JSONObject ...
0
votes
3answers
358 views
Fatal Exception AsyncTask #1 at doInBackground()
I am newbie on Android and I am developing an app that gets some information from a QR code and then connects a php page. However app crushes after it reads QR code and logCat gives a Fatal Exception ...
0
votes
1answer
96 views
HttpClient queries on main thread keeps crashing when in Runnable
I've expierenced this code runs smoothly on Android 2.2. But on Android 4.0 it crashes.
I am assuming that, It's caused by HttpClient. So I moved the code into a Runnable, but it keeps crashing.
new ...
0
votes
5answers
65 views
Android operations and threads
I'm currently writing and android app, and I was using HttpClients and those classes. I spent 2 hours trying to fix some errors until I read a post that said that you cant do that operation in the ...
0
votes
0answers
115 views
android http client returns nullpointer exception when internet connection is turned off and turned on again
I wrote an android app where it has a static httpclient in the main activity, so that i will be using it throughout my application. A user can normally login to my app where httpclient is ...
0
votes
2answers
462 views
Android code after httpclient.execute(httpget) doesn't get run in try (using AsyncTask)
I'm trying to get data from a website and parse it into my android application.
Unfortunately I don't even get to the part of parsing the data.
The code doesn't run after the following line:
...
2
votes
2answers
382 views
setText from a parsed JSON object with AsyncTask [duplicate]
Im making an android program that parses JSON texts from a source code of a webpage in the internet. It is working in android 2.2 but I need it now to be on android 3.0, which needs to be on the ...
0
votes
3answers
293 views
JSON on AsyncTask?
I'm making an Android program that gets JSON data from the internet. JSON text comes from a source code of a webpage (using HttpClient), then parse it and display it to a TextView. This is working on ...
0
votes
2answers
255 views
Passing a string from a AsyncTask to another activity
I'm trying to use the HTTPClient to get the html code of a website using an AsyncTask and passing back the code to my main Activity.
I used this code in order to (try to) do that :
public class ...
0
votes
2answers
100 views
When app is onPause() I keep on receiving error messages on the LogCat
thank you for your help and Happy Christmas.
Ok.
Now I have the following class, which I instantiate in my main activity in order to retrieve some data from the internet.
As you can see the class ...
-1
votes
2answers
346 views
Cannot connect to a PHP server in an Android http client
I'm contacting a PHP server in an Async Task in my android program. I'm getting In close() at SocketHttpClientConnection whenever I try to execute a http post request. I'm adding some name value pairs ...
0
votes
2answers
570 views
Can we run HttpClient many times in AsyncTask?
Due to android doc , The task can be executed only once.
I'm trying to run HttpClient in UI-Thread. But it allows for the only once. If I want to get another data from another link which is not yet ...
0
votes
1answer
504 views
Android -> AsyncTask, HttpClient and SharedPreferences
I need help with using AsyncTask. I am using HttpClient post to send data (wich is saved in SharedPreferences) to webpage. I need to compose this inside of an AsyncTask ... Can somebody help me ...
0
votes
2answers
381 views
Issue with Asynctask and HTTP connection
I have this really crazy problem which I cant seem to tackle. I tried many variations to my approach but it doesnt seem to work like I intended.
What I want is when the user clicks a button on my ...
1
vote
0answers
307 views
AsyncTask - onPostExecute is not called
I'm working on one project and I need to call one AsyncTask, but the onPostExecute method is not called.
This is my class:
public class WebService extends AsyncTask<String, String, String> {
...
0
votes
3answers
399 views
Implementing Async Task in a Class
I have tried making a class supporting AsyncTask and I failed miserably. Later I made a superclass of this class and added to my Main Class this:
//subclass of the superclass CustomHttpClient
...
1
vote
1answer
366 views
Code works on PC but not Android (Gson)
I'm not having good luck moving code from my PC to Android. I am having problems with code that works on my PC but not on my Android phone. I am using the same libraries (GSON) and nothing I am doing ...
0
votes
1answer
397 views
OutOfMemory on AsyncTask in Android
Im getting an OutOfMemory Exception when using this code:
class ApiTask extends AsyncTask<URI, Void, String> {
private Exception exception;
protected void onPreExecute() {
...
0
votes
1answer
1k views
How to asynchronous perform a httprequest and show the progress of downloading the response
I am trying to perform a http-get-request and show the download progress to the user. I am familiar with the concept of AsyncTask, I also know how to use URLConnection together with ...
0
votes
1answer
433 views
How to make a blocking Android HttpRequest
Here is my issue:
I have a list of values which I retrieve from server.
These values fill ListView in the UI.
I cannot continue loading the View and showing it to user until the list is full.
Since ...
0
votes
1answer
286 views
HTTPRetryHandler in Asynctask
First of all, sorry if the code looks messy, i tried to indent but it seems i need more practice.
I am doing 3 HTTPS requests in a AsyncTask(doInBackground).
Every requests grabs soms data from a ...
0
votes
2answers
1k views
AsynTask scheduled in Android service executes properly only one time
I am trying to create simple Android program that pulls web server every 30*1000 milliseconds. I have dedicated service in my application - PollerService
Android Manifest.xml:
<application ...
0
votes
1answer
459 views
Stop HTTP requests in async tasks on changing activity
I am downloading multiple images in an activity to populate a list view, all in seperate async tasks. In this activity the user can press a button to go to another page which doesn't require the ...
2
votes
2answers
3k views
Asynctask with HttpClient and Progressbar
I am trying to get my HttpClient to work with Asynctask including a progressbar.
I already have this code of the Asynctask:
private class httpClient extends AsyncTask<String, Boolean, String> {
...
0
votes
1answer
494 views
android asynctask for httpconnection
can any one please tell me how to fix this problem .... why is it not working
im trying to asynctask the connection to a server so it can be on separate thread
private class SticketFunctionTask ...
0
votes
1answer
1k views
Keeping a HttpClient alive in Android
I am developing an android application which fetches data from a stateful web-server. Hence a httpsession is maintained.
Currently I have developed a singleton class in my android-app which is ...
3
votes
2answers
1k views
Is there a way to stop a HttpClient's execution in an AsyncTask?
I have an AsyncTask that handles a rather long download, using HttpClient. I'd like to stop the execution of this request if the user finishes the Activity that starts it. How can I achieve this?
So ...
1
vote
2answers
1k views
(Android) Threaded httpClient task, without blocking UI?
I've made an application that Fetches a Webpage from the internet, based on user input, wich worked. The fetching goes in different steps: post with String from edittext as parameter, after some ...
6
votes
2answers
3k views
Cancelling file download with httpclient and asynctask
In my app I need to download files from url locations. I want to display progress of the download in a dialogbox (or optionally in the notification area). I've come across several good resources on ...