looper
Why does Android service needs to run on UI thread?
I have a probably simple question. I have an android service; where in I have created a generic service class which requests locks and executes actual (extending) service code in a separate thread. Ex[详细]
2023-02-23 04:33 分类:问答Create a Handler Inside Thread in Android
I tried to show the toast from the thread. Toast.makeText(activity.getApplicationContext(), \"This is the Toast message\", Toast.LENGTH_LONG).show();[详细]
2023-02-20 10:34 分类:问答Handler-Looper implementation in Android
I have Activity with Handler (UI thread) I start new Thread and make handler.post(new MyRunnable()) - (new work thread)[详细]
2023-02-17 13:09 分类:问答Create Handler in a class without get error "Looper not prepared"?
In my game, there is an game object class that need to use Handler to post a delay Runnable. However, everything I try to create an Handler in the object class, I receive error message:开发者_StackOve[详细]
2023-02-15 19:53 分类:问答How can I do non-blocking events processing on Android?
This question is about event handling on Android. It is not specific to c++. I need to process UI/OS events, without blocking when all events have been processed.[详细]
2023-02-10 22:35 分类:问答StrictMode confusion - how is this the wrong thread?
My issue: 12-18 17:05:03.336: DEBUG/StrictMode(2112): StrictMode policy violation; ~duration=2073 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=23 violation=2[详细]
2023-01-31 11:01 分类:问答Android: Issue using a handler and postDelayed()
I am tryi开发者_JAVA百科ng to use a Handler to have some code execute in some amount of time. This works well in 2 of my classes, but I\'m running on an issue with this one:[详细]
2023-01-28 07:28 分类:问答AsyncTask and Looper.prepare() error
I have the following code class OverlayTask extends AsyncTask<Void, Void, Void> { @Override public void onPreExecute() {[详细]
2023-01-25 19:16 分类:问答Android: looper/handler vs. Java Observer?
Aren\'t these competitors?I开发者_高级运维\'m thinkin they\'re not, but don\'t see it. How about within the context of an Activity needing to learn when a Service has new xyz?[详细]
2023-01-22 19:11 分类:问答CountDownTimer: "Can't create handler inside thread that has not called Looper.prepare()"
I know the general problem of \"Can\'t create handler inside thread that has not called Looper.prepare()\" has been asked before, but I am struggling to understand how it applies in this case.[详细]
2023-01-21 12:05 分类:问答