Questions tagged [android-asynctask]
Use for questions on android.os.AsyncTask
android-asynctask
14,513
questions
0
votes
0
answers
15
views
Android Thread InputStream from web page
I have an old app in Android that just downloads the content of a web page and sends it to a Bluetooth printer. It was working fine but with the new Google restrictions to Android apps it's just ...
0
votes
1
answer
27
views
How to associate Fragment with no UI to the MainActivity
I have MainActivity.java that implements an interface from SshFragment.java which runs an AsyncTask in the fragment. The fragment has no UI but I'm unsure how to define it so and I'm confused how to ...
0
votes
1
answer
26
views
android.os.NetworkOnMainThreadException even using an Aysnc task
I am trying to call a SOAP service with Android studio, but I am getting the following exception android.os.NetworkOnMainThreadException
I know should be when running a network call on the main thread,...
0
votes
0
answers
19
views
SYNC SMS in Flutter
I get all device SMS on my Flutter app and display it on the list on the home screen. But I could not understand how I sync my all SMS on screen every time. if any suggestions for me. What is the best ...
0
votes
0
answers
37
views
accessing MainActivity from long running async task safe way (eg after conguration change)
I have a long running (really long, more than 60 seconds or more) async task. Sometimes this task has to access the MainActivity (mostly UI updates, but sometimes accessing Shared Preferences and ...
0
votes
0
answers
25
views
Java Android how to make two parallel progress bars in recyclerview
I am making a game that has a recyclerview with several items, each item has its own progressbar filling time, I need them to fill in parallel and start over after completion.
I did it with asynctask. ...
-2
votes
2
answers
50
views
How to wait for async task to finish getting data from database before loading maps without sleep?
So my object is simple and need to know if I can either make my code better all the way around or remove sleep from my code and somehow wait for the async task to finish with getting data from a ...
0
votes
0
answers
81
views
How to overcome ANRs issue even though i run the background task in GlobalScope.launch(Dispatchers.Main)
The app is prompted with an "App is not responding" window.
In my main activity, inside the button click, I am calling "Background task" Meanwhile I am shown a progress bar in the ...
0
votes
1
answer
59
views
Writing Values to Google Sheet - Coroutines and NetworkOnMainThreadException Issue
I'm attempting to write data from a list to a specific Google Sheet. I've set up the configuration, but I'm encountering an error that seems related to not using a coroutine.
Is my approach correct? ...
0
votes
0
answers
33
views
Socket closes after sending a message, thus making receiving message impossible
I have a server handler class in my android app that reads and write messages in the Socket, the socket gets passed to it by the ClientController which runs this socket in AsyncTask. connection to the ...
0
votes
1
answer
36
views
Change value in a TextView after requests to firebase - Java Android studio
I make two requests to the Firebase database, and then load the data into the XML. But it doesn't load them and just leaves the default, I suspect it's because I'm not handling asynchronous requests ...
0
votes
1
answer
48
views
Change TextView in the xml file after two asynchronous requests - Java Android studio
I make two requests to the Firebase database, and then load the data into the XML. But it doesn't load them and just leaves the default, I suspect it's because I'm not handling asynchronous requests ...
0
votes
0
answers
83
views
Async/Await Error when Taking Screenshot in Python Using Playwright: 'signal only works in main thread of the main interpreter'
I'm currently working on a Python web application where I need to take a screenshot of a user-provided URL using Playwright in an async function. I'm encountering an issue with asynchronous execution ...
0
votes
0
answers
38
views
ANR Genrated : Local Database data load is not working properly in android
I have one query regarding the local database.
As my system works, when the user logs in for the first time in the application that time in the dashboard we get an API call for getting data. But in ...
0
votes
0
answers
41
views
Data bindings don't change UI harmoniously after await Task.Delay(..)
I have 2 seperate data bindings, these 2 variables fill 2 seperate group of circles on the screen.
public ObservableCollection<Color> CircleColors
{
get => _circleColors;
set
{
...