Is it a good solution or not?
How to implement?
When should I shutdown properly? I shutdown it onDestroy() in the Activity, then relaunch my app as soon as possible. It causes a java.util.concurrent.RejectedExecutionException, why? Does anyone know its lifecycle?
Any idea? Thanks.
...
I'm utilizing the Open Session in View pattern for my jsf/icesfaces application.
As usual a servlet filter is opening and closing all the hibernate sessions at the beginning and the end of a "web server thread".
My problem now is that I'm using asynchronous tasks for eg. loading big lists of objects from the database. Therefore I'm crea...
Hi Everyone,
I am trying to call the invalidate() from asyntask thread. I am getting this error :
10-18 15:14:30.469: ERROR/AndroidRuntime(889): Caused by: android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
The line I have used is :
mainClass.myMapV...
I've got an TabActivity implementing TabContentFactory, which starts an AsyncTask in onCreate() to fetch the data for the tabs. When the AsyncTask has finished, onPostExecute() could directly update the UI-elements, right? Meaning, since that method runs in the UI-Thread no further thread-synchronization would be required when accessing ...
Sorry that I'm asking such a question, but I'm tryin to make this one run for hours, and I'm not finding the mistake...
public class Main extends ListActivity {
/** Called when the activity is first created. */
ProgressDialog dialog;
@Override
public synchronized void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInsta...
I was trying to get my method running in background using Asynctask, but using sample from the book for a basis the only thing I get is crashed application. At moment I am using this code:
private Handler mHandler = new Handler();
private Runnable mUpdateTimeTask = new Runnable() {
public void run() {
Location location = tra...