AsyncTask enables proper and easy use of the UI thread. This class allows to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers. AsyncTask is designed to be a helper class around Thread and Handler and does not constitute a generic ...

learn more… | top users | synonyms (1)

4
votes
0answers
3k views

ObjectAnimator onAnimationEnd listener is called before the animation finishes

its weird and strange, but it seems like when I attach an AnimatorListener to an ObjectAnimator I use for animating fragment transactions, the callback gets actually called slightly before finish of ...
4
votes
0answers
393 views

Unable to find seq points for method '(wrapper managed-to-native) System.Diagnostics.Debugger:Mono_UnhandledException_internal (System.Exception)'

I am making an android project in Xamarin where I need to perform some task in AsyncTask. But my code is not reaching the RunInBackground(). If I replace RunInBackground() with DoInBackground() I get ...
3
votes
0answers
107 views

Handling actionbar items from asynctask inside a fragment of ViewPager and Orientation Change

Scenario: I have a MainActivity hosting a ViewPager and PagerSlidingTabStrip which holds 2 fragments. Both fragment uses same class to extend Fragment. Each fragment has a ListView and AsyncTask. ...
3
votes
0answers
323 views

NullPointerException in android AsyncTask in method innerSetException():

In the app on which I a working I have a method called addVideo which gets called in the doInBackground method of an AsyncTask, which basically just adds a video to the media store and returns its ...
3
votes
0answers
1k views

How to change priority of a single ASyncTask

I was wondering how I could force a new ASyncTask in Android to be the next task executed. Imagine I have multiple ASyncTask's to load content from the internet, e.g. in my case I pre-load all objects ...
3
votes
0answers
417 views

ViewHolder tag issue with AsyncTask in loading Thumbnail

I'm trying to write my own custom CursorAdapter that will show a text and an image next to it. I'm using view holder pattern and AsyncTaskfor the loading of the images. The code I wrote works fine and ...
3
votes
0answers
368 views

Android: URLConnection getContentLength giving incorrect output

im trying to get the size of a file using: URLConnection conn = null; URL url = null; url = new URL("https://dl.dropboxusercontent.com/u/90210205/Default.html"); conn = url.openConnection(); ...
3
votes
0answers
220 views

Custom AsyncTaskLoader class doesn't honor calls to forceLoad

This is a bit of a weird problem. I'm using a class that extends AsyncTaskLoader (real deal targeting API level 11, not the compatibility one) to receive intents sent by another app component and ...
3
votes
0answers
493 views

Android BaseExpandableListAdapter with AsyncTask saving list state

I've been trying to figure this out for days now, after searching and searching and searching I gave up and decided to ask the community. Any help is greatly appreciated. I am extending ...
3
votes
0answers
2k views

Android - AsyncTask Socket Write Timeout

I have a background alarm running every minute using the example posted here: Alarm Manager Example My actual alarm launches an AsyncTask (since I am doing a network transaction), that looks like ...
2
votes
0answers
11 views

“Attempted read on closed stream” when trying to use two AsynTasks in same time on 2.3

I have 2 different AsyncTask. I trying to execute it in same time. On 4.0+ Android it works fine. But on 2.3 one of this Task always throw exception "Error converting result: java.io.IOException: ...
2
votes
0answers
75 views

Android - Performing searches with AsyncTask, sometimes causes java.lang.IllegalStateException (conn# 0) already closed

I have implemented an app that has activity which uses a searchview in its actionbar. The thing is that while developing and testing on modern devices (android 4.4) I never had any problem, but now ...
2
votes
0answers
45 views

Google maps static returns FileNotFoundException in 3G

When I try to download a static Google Map, when I am connected in Wifi, there is no problem, Picture displays well, but when I am connected in 3G, I get this error: java.io.FileNotFoundException: ...
2
votes
0answers
73 views

Updating row in database from android app

I'm trying to update a row in my database via my android app. My pulling from the database is working but I'm having trouble with the updating. My code for updating is as follows: My AsyncTask class: ...
2
votes
0answers
319 views

Google+ OAuth2 Flow in Android: Ensure offline access using the temporary auth code

[- Summary -] Problem: I am trying to implement a Google+ Sign-in with server-side API access for an Android app. I am encountering a problem where sometimes offline access is not granted by the ...
2
votes
0answers
73 views

Is AsyncTask delivering any response between onDestroy() and onCreate() callbacks of a fragment?

I know I came a bit too late to the party and over the past 3 years (or maybe longer) there've been thousands and thousands of discussion like this one (unfortunately most of them involving activities ...
2
votes
0answers
84 views

How I can pass arguments to AsyncTask, and returning results to a field variable from another class?

I have a problem with asynctask in android Java. it's the same problem as this : variable returns null outside asynctask android my asynctask get data from a url , to get direction of google maps ! ...
2
votes
0answers
283 views

Custom Loader for endless scrolling

I'm trying to create a custom loader which loads an list of data that works fine but now I want to added endless scrolling in the listview. I thought a logical place would be in the loader since ...
2
votes
0answers
234 views

Error executing doInBackground() while implementing swipe tabs

I downloaded the source code for implementing Google Places API from here(can be downloaded from here), but it has only a basic ListView but I wanted to integrate swipable tabs with it, so I tried ...
2
votes
0answers
109 views

How to get a list of file in list-view from Http server in android

I am very new in android and I am trying to list all audio file from my http server to list-view from a particular folder of http server... To do that i have written PHP web-service. Web service is ...
2
votes
0answers
118 views

OnProgressUpdate are called at once time after end of for cycle

I want to update progress bar using AsyncTask and method onProgressUpdate. I have for cycle in method doInBackground, but progress are called at once time after for cycle is ended. A tried add log ...
2
votes
0answers
60 views

Android ProgressBar interfering with GCM registration

I'm writing an app which uses Google Cloud Messaging. The app can register for a new registration ID without any issues. However, if I display an indeterminate ProgressBar during the registration ...
2
votes
0answers
92 views

Android network request followed by a different AlertDialog

What I want to do is to launch from the MainActivity in a new Thread a procedure that: 1) Makes an Internet call 2) Extract something like a boolean from the response (that represent which ...
2
votes
0answers
129 views

Long delay when calling swapCursor in OnLoadFinished

I am implementing a ListView that contains a Customized CursorAdpater with a LoaderCallbacks. When OnCreatLoader is called I am running an AsyncTaskLoader that gets theCursor from the DB. I noticed ...
2
votes
0answers
120 views

Download the images from the folder of the remote database and print them in a GridView

The following code does not print the images downloaded from database at the Activity. I do not understand where I'm wrong, does not crash. Thank you in advance to those who help me! ...
2
votes
0answers
654 views

Using ViewPager and AsyncTask together

If I start an AsyncTask within the getItem() function of a ViewPager Adapter, passing the Fragment getItem() later returns to the AsyncTask as a parameter (see below). Can I then call a method ...
2
votes
0answers
268 views

how to implement AsyncTask in titanium studio

I'm working on a mobile app project in Titanium Studio (version 3.1.1). It was designed few years ago and now the app crashes on new android os (Android 4.0 and above). It crashes because the new ...
2
votes
0answers
411 views

Call AsyncTask in a Fragment

I have a class that extends a Fragment. I would call my AsyncTask class in the Fragment. I doesn't obtain any error in mylogcat but I doesn't display null in my listview. Below paste the code that I ...
2
votes
0answers
169 views

IllegalStateException due to a detached fragment when trying to use context

I have a fragment that has an AsyncTask running a list population job. Inside the AsyncTask.doInBackground() I use the method getString() to, get a string. I've had an IllegalStateException thrown a ...
2
votes
0answers
172 views

Implement non blocking progress dialog like playstore and facebook

I am implementing custom progressDialog in my app where I am using animation-list to display a moving image but what I want to do is, embed my progressDialog in my activity such that it doesn't ...
2
votes
0answers
194 views

Android Game Development. Async Task. Loading Bitmap Images Sounds.

Im working on this game for android. And wanted to know if my thread architecture was right or wrong. Basically, what is happening is, i am loading All the bitmaps,sounds etc in the ...
2
votes
0answers
142 views

Why do thumbs change in this asynctask load adapter?

I've made an image viewer that shows thumbnails. The thumbnails are bitmaps populated inside a gridview, with a custom BaseAdapter. Works fine, but the app freezes just a bit to populate the gridview ...
2
votes
0answers
340 views

frozen while loading data for a Viewpager using AsyncTask

In my code, I have an activity with a button that calls another activity with a viewpager and within this, three fragments. //... ViewPager pager = (ViewPager) findViewById(R.id.pager); ...
2
votes
0answers
447 views

Viewpager Do not destroy / Save destroyed page

I have viewpager and asynctask together. I'm showing content without problem. But; When I add radio buttons to pages ( for multiple choice questions ), after I swipe between contents, previous ...
2
votes
0answers
222 views

Countdown in an android notification

I'm trying to make a countdown in a notification for an application: When the application gets a notification, the notification has 20 seconds to disappear. Here is my code, but my application breaks ...
2
votes
0answers
212 views

Looper.loop doesn't allow execute another work in Android thread

I have created thread that connects my app throught socket. But I need to read and write data from/to socket in this thread. I can't do this because Looper.loop doesn't allow this. How can I read ...
2
votes
0answers
348 views

How to get data from asmx webservice?

I want to access the name of customers that is in red color box, in the picture above, but it do not gives me data, it shows only "anydata type( )" only one time. I do not know what is category ...
2
votes
0answers
181 views

compatability with 2.3 and higher with listfragments, tabhost,simple curson adapter

I am creating app to load tweets for a particular firm. To make it compatible with Android 2.3 and higher version, i needed to use FragmentActivity & ListFragment. I am getting tweets on app start ...
2
votes
0answers
438 views

Having trouble gett my fragment to populate a listView using an asynctask

I have been busting my head over this for a whole day now, so I figured I would ask for some help. I am trying to get this fragment to properly populate the listView, but no matter what I do, I get a ...
2
votes
0answers
1k views

ListFragment inside ViewPager

I have a Viewpager, that contain fragments, and a listfragment, the listfragment gets data from a asynctask, and then uses the setListAdapter to set the data, the only problem is, the data is not ...
2
votes
0answers
831 views

Android Asynchronous Http Client BinaryHttpResponseHandler Not Firing

EDIT: I've traced the problem down to the actual image URL. I've found that if I use URLs that I get from my server (e.g. ...
2
votes
0answers
729 views

Why don't AsyncTasks always work within an onClickListener?

I have noticed a this over the last few months. If I set a clickListener on a button to execute an AsyncTask, it doesn't always get executed. I solve the problem by wrapping the line of code that ...
2
votes
0answers
236 views

ProgressDialog updating in onProgressUpdate, recounting when big size file downloading in Android

I'm writing program to download large size of file (~ 280 MB) from a remote server. Downloading process working perfectly although it takes lot of time. Then I used a ProgressDialog to show the ...
2
votes
0answers
473 views

Should a RESTful Content Provider use SyncAdapter?

I have a custom content provider and sync adapter which work fine but I am unclear on best practice to initiate async requests to the server. For example, when a client makes a query request to the ...
2
votes
0answers
1k views

Asycntask multiple downloading fails in Listview

I am downloading mp3 files (using asynctask) and updating there progress in Listview which contains progress bar and textview (which shows how much % is downloaded). It runs ok till 2% to 3% but then ...
2
votes
0answers
371 views

setRetainInstance does not work for all UI elements?

I'm using the sherlock actionbar and use tabs and fragments for the main layout of my app. One of the fragments is capable of running an asynctask, now when the orientation of the device changes i ...
2
votes
0answers
350 views

ListView - ListView don't update

I'm trying to do Autogrowin/Endless ListView but I have a problem with ArrayAdapter = update after downloading the data. public class ListShowActivity extends ListActivity { private ...
1
vote
0answers
27 views

Load images asynchronously in Android ListView in wrong order

I'm running on a problem and I'm unable to solve this issue. I'm accessing Facebook API to retrieve my app users, then I parse the response into a custom object. Everything works fine until there, so ...
1
vote
0answers
21 views

Calling web-app methods using hessdroid = new AsyncTask for each method?

In my Android application I want to call some web-app methods. I use hessian for this (hessdroid library for Android). That's how it works: In my Android app I have interfaces for all of the the ...
1
vote
0answers
44 views

Android Fatal signal 6 (SIGABRT) from asyncTask

I have a working android game which occasionally force closes on slow devices with the error Fatal signal 6 (SIGABRT), code -6 in tid 14620 (AsyncTask #1) Research indicated to me that this was ...