Category "android-asynctask"

Alternative to AsyncTask with HTTP POST request because it was deprecated

I made an android app 5 years ago that use AsyncTask to create an HTTP POST request to send a receive data from server, with two parameters. Any help would be a

How to access and return the result of an AsyncTask from a repository?

I'm new to coding, put already in a lot of hours and feel like I'm progressing step by step. However, I've encountered a problem that I was not able to solve ev

AsyncTask as kotlin coroutine

Typical use for AsyncTask: I want to run a task in another thread and after that task is done, I want to perform some operation in my UI thread, namely hiding a

handleWindowVisibility: no activity for token android.os.BinderProxy

I have a Login screen and upon success login, it finishes and shows another page that has information about the user. I read about this post and also this post.

How to load data in one fragment in Android

I want show 3 fragments in my Activity and load data from json in any fragments! I want show each json data into one fragment, but in my application show all of

The AsyncTask API is deprecated in Android 11. What are the alternatives?

Google is deprecating Android AsyncTask API in Android 11 and suggesting to use java.util.concurrent instead. you can check out the commit here * * @deprecate

Android: Alternatives to AsyncTask?

for my app I made a framework for all network calls to an external API. I put everything in "Services" like: UserService, MessageService etc. So now when I want

Android not make GET request after app closing from Service

First of all sorry if such sort of question is already asked before. I want to make a app which make a GET request or Simply Open A URL to tell server that app

Android not make GET request after app closing from Service

First of all sorry if such sort of question is already asked before. I want to make a app which make a GET request or Simply Open A URL to tell server that app

Suspending threads while running multiple AsyncTasks in nested fragments and it makes app slow

Here I'm calling web services in nested Fragments which has TabLayout and ViewPager using AsyncTask. I've tried AsyncTasks by calling them all in onResume metho

PDF load error in com.github.barteksc.pdfviewer

I'm using com.github.barteksc.pdfviewer library to view pdf files. I don't know what happened it stopped working from past 2 weeks, Im getting PDF load error. T

java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0

I am trying to get datafrom database in a list. This is my code: private class LoadData extends AsyncTask<Void, Void, Void> { private ProgressDialog

How do I return function value in lifecycle-aware coroutine scope in Android?

fun returnValue(): Int { viewModelScope.launch { return 1 // Something like this } } I want to return some value in a viewModelScope like the

How to display Toast in Android?

I have a slider that can be pulled up and then it shows a map. I can move the slider up and down to hide or show the map. When the map is on front, I can handle