All Questions
Tagged with java-threads android
141 questions
1
vote
1
answer
88
views
How can I identify which code in my Android application initiates the creation of threads using the Android Profiler
I am working on a plugin-based application which has different plugins. Each plugin is independent of the others. I am also using the Google Places API as a plugin in it. There is an option to refresh ...
0
votes
1
answer
411
views
Access values from another thread? Kotlin/Java
I am programming an app with Kotlin using Android Studio.
I want to open a specific URL to check if a value in it is true or false (SmartHome Stuff) and then change the color of a button in my app. ...
0
votes
1
answer
180
views
How to show a circular loader during an API request in Android Studio
I am trying to show the Progress Bar component (circular, not horizontal) during a GET api request in Android Studio. I am running the API request on a different thread and I am setting the progress ...
-1
votes
1
answer
149
views
Error while working with getLooper() method in android
I am learning threading and concurrency in Android. I have created a basic program where the main thread sends an interrupt to the worker thread to stop the worker thread's processing. The main thread ...
0
votes
1
answer
268
views
Can I have multiple threads post to the UI Simultaneously?
I am creating my first Android App using Java. At onCreate I have a number of methods that set up the size/positions of cardViews, size of text, background images and so on. Because of the amount of ...
0
votes
0
answers
127
views
Retrofit API calls are not synchronous in Android
I am getting location of the user in the background service and putting it in local database and I am checking if any connection is available I've to pass this data to the server using API. For API I ...
0
votes
1
answer
41
views
The work manader's work is not controlled
I have a wok manager that I run from the Main Activity when the user logs into the application. So, I will tell you in more detail what I do in the manager: in it I start a stream in which every ...
1
vote
1
answer
69
views
How can I use variables from one thread class activity to other activity which don't contains thread class
I am new to android development and threading. I have one activity which has Thread class which is receiving continues values through socket programming. I am not able to use these values in other ...
0
votes
1
answer
84
views
I need to pause the execution till I get response from my database. How do i do it?
I am making an Android Java Application. I have a class with a function which uses Volley to get me 2D string array from my databse. Since I cannot return the string array from the function I created (...
0
votes
1
answer
42
views
How can I be sure a thread is complete before continuing?
I've just started using threads in Android java. I'm launching a thread from my main activity, but I need to be sure it has completed before continuing with the main logic flow.
The code is:
...
-2
votes
2
answers
853
views
Thread.sleep does not pause the app in Android
I would like to pause my android app for 1 second after I inserted something into the Firebase database. For that I use the following code insider a liistener:
firebase_DB.child(id).setValue(...
0
votes
1
answer
65
views
How to make Thread in android run infinitely
Runnable updateSeekbar=new Runnable() {
@Override
public void run() {
try{
while (true) {
if (!isPlayerDead) {
Log.d("Threads",...
0
votes
1
answer
70
views
Too much work in main thread issue warning.How add AsyncTask?
Guys help add asynctask to my app.I have issues with adding this.Maybe any hints how realize this.Its rtsp video player.App communicate with web server and drawing video using canvas.Async task help ...
0
votes
0
answers
169
views
Multiple threads being added to application every run through if the app is not shut down
Whilst running my android app the thread count is rising 20 threads per run through. I have google maps and display a map on the first activity then it is, choose destination run the route then finish ...
1
vote
1
answer
242
views
Scheduling Multiple Runnables in Sequence
I am working on an Android app in Java. It is a game that is basically a trivia game focused on seniors. The GameActivity runs 10 rounds per game. I am currently doing this with a handler and ...