Android Multi-threading is the ability of an Android app to perform work concurrently or asynchronously by utilizing multiple concurrent streams of execution (generally referred to as threads).
Questions tagged [android-threading]
90 questions
0
votes
2 answers
Create synchronization interval in RxJava
I need to run 2 JOB at a specific interval of 4,8,12,16... second and another one is 5,9,13,17...second.
I have used Interval operator in RxJava. Job B needs to run after Job A. Job B should sleep when Job A is running and vice versa. Till now the…

Chiradeep
- 973
- 12
- 32
0
votes
1 answer
RxJava and Realm request make app skip frame
I'm using RxJava and Realm database in an android project. But sometimes pressing a button is unresponsive and you have to do that many times for it to work sometime, and android log is saying xxx frame skipped. I know it has something to do with…

Dr4ke the b4dass
- 1,184
- 2
- 17
- 40
0
votes
1 answer
Occasional I/Choreographer(17165): Skipped ## frames black screen lock up, Android Xamarin c#
Occasionally when importing photos or returning to the app from an activity such as watching videos our app locks up and gets a black screen, although some functions still continue underneath such as toasts. The end of the log consistently…

BretBean
- 33
- 6
0
votes
1 answer
Will Android ever suspend a UI thread to run a background thread?
Is the Android thread scheduler guaranteed to prioritize the main UI thread over all other user (worker/background) threads, or might user threads interrupt the main thread? My goal is to avoid race conditions without over-synchronizing my…

Ellen Spertus
- 6,576
- 9
- 50
- 101
0
votes
3 answers
I need to increment a number every second using threads in android
Here I am doing it using Handler but it only increments a number once. I want it to increment the number until I stop it using handler.removeCallbacksAndMessages(null);.
Can anyone please guide me how can I achieve this. I am just new to android.
…

Wasif
- 61
- 10
0
votes
1 answer
Android, IntentService vs Custom service with HandlerThread
I have read one post about Android services within threads but there is one thing that I did not understand. In the post the writer uses a custom service because it allows multitasking while IntentService does not.…

JMP
- 75
- 7
0
votes
1 answer
How to implement threading in Xamarin.Android?
I'm trying to send/publish at 100ms, and the message looks like this
x.x.x.x.x.x.x.x.x.x
So every 100ms or so subscribe will be called. My problem is that I think, it's not fast enough, (i.e if the current subscribe is not yet done and another…
user10721398
0
votes
1 answer
Is it bad practice to access a view in doInBackground()?
Is it bad practice to pass a UI element, such as a TextView, to AsyncTask.doInBackground() (through AsyncTask.execute()) and to read fields from the view in the background thread? (I know it's not okay to alter GUI elements from a background…

Ellen Spertus
- 6,576
- 9
- 50
- 101
0
votes
0 answers
Thread stops when creating TCP connection
I am building an application that starts a Connection via a Thread but when i initialize the Connection the Application doesn't connect and stops (it continues to work but it does nothing).
1 week ago it did work without any troubles, but when i…

DRE
- 263
- 8
- 35
0
votes
1 answer
Best way to connect visibility of ImageView to state of MediaPlayer?
I'm working on a project where an ImageView element should only be visible while a MediaPlayer object is playing.
The state of the MediaPlayer can change at any time.
What would be the best way to hook this up? I've considered running a thread in…

Kona
- 3
- 2
0
votes
1 answer
Making multiple process at the same time with handler error
I am creating app that can run 2 process at the time (saving to database / sending to api) but , i was encountering issue from my treading.This is my code upon my threading:
this is my code:
public void timerToSaveSend() {
Thread t1 = new…
user6440030
0
votes
2 answers
Are background threads necessary if I am storing and retrieving data locally?
I am building a simple task list app which stores and retrieves tasks from shared preferences using the Gson library. At this point there isn't any noticeable delays or glitches so I'm wondering is it necessary or may become necessary at some…

Jeffrey
- 1,998
- 1
- 25
- 22
0
votes
0 answers
why a new Thread can touch view
as we know in Android applications we can touch views just from Main/UI Thread and otherwise an CalledFromWrongThreadException throws with below message:
android.view.ViewRootImpl$CalledFromWrongThreadException:
Only the original thread that created…

beigirad
- 4,986
- 2
- 29
- 52
-1
votes
1 answer
Understand Threading in Android(Update UI from another thread)
I was trying to understand the threading in android. As we know, we can't update a view from background thread. I was trying to understand with different cases and came across a case below. When I clicked on the Start work button, I created a thread…
-1
votes
1 answer
Start and Interrupt and Again Start a Thread
i started a thread when activity created in android
when click stop it will interrupt the thread to see my data on particular time after that i start the thread by clicking button start
it will start the thread again
sometime it work…

Codefordina
- 19
- 3