Skip to main content

All Questions

Filter by
Sorted by
Tagged with
4 votes
1 answer
2k views

Alternative class to imitate AsyncTask class (deprecated) with Thread and Handler classes

As the title says, I have created an alternative class to imitate AsyncTask class (deprecated) with Thread and Handler classes but i feel uncomfortable to use it.(the app works fine with my class) Can ...
Bulutay Saraç's user avatar
3 votes
1 answer
405 views

A thread-safe typed Promise implementation in Java for Android

Introduction I've created a typed Promise implementation in Java for Android, borrowing ideas from this article for a JavaScript implementation, by Forbes Lindesay. To allow for "asynchronicity", my ...
user avatar
0 votes
1 answer
213 views

Async Task using RxJava2 in Android

I have tried to create the async task using the RxJAVA2. The code is working fine. WHat enhancement can I do in this code? ...
Ankur_009's user avatar
  • 131
0 votes
1 answer
183 views

Dagger 2 test application

I have a complicated Dagger 2 use case on Android, where I have a lot of dependencies, but some of them are really slow to construct. Like 2-3 seconds slow. My solution was to create an RX ...
milosmns's user avatar
  • 103
4 votes
1 answer
178 views

Creating new async tasks

In the past, I have used AsyncTasks to perform network requests for my Android app. I recently switched to RxJava to be able to cancel the requests when the user exits an activity. I have created a ...
Jtvd78's user avatar
  • 141
3 votes
2 answers
243 views

Calculating Pi with Android

I'm kind of new to Java but I am writing an Android app. Right now I'm working on an async task to calculate Pi but when I run it the memory usage increases alarmingly (+5MB per second). This one ...
nshoo's user avatar
  • 131
1 vote
1 answer
697 views

HttpRequest class using AsyncTask for Android application

I am using the following class to retrieve a http response, which contains data for my Android App. Everything works fine, but there is a performance issue. I get the following warning when requesting ...
Lakshan Sivananthan's user avatar
2 votes
0 answers
2k views

Handling Firebase's asynchronous calls Android

I have written a helper class to manage callbacks from Firebase's asynchronous calls. Can this be implemented in a better way? ...
Ishank Gulati's user avatar
2 votes
1 answer
191 views

Android network API request

I often use a similar scheme work with an API project. Can it be made easier, or is there a standard approach? This class creates an API request: ...
Kota1921's user avatar
  • 133
6 votes
1 answer
541 views

Login UI for an Android app

This code starts a new thread for login and reacts according to the JSON result returned by the server. I think this code has too many conditionals, exception handlers, and nested functions. ...
WangZhiYao's user avatar
2 votes
1 answer
144 views

Java basic AsyncCache implementation

I wanted to use an async-cache to store URLs of images that I have to display in a list. The image URL is fetched (REST call) using a unique UUID associated with each item of the list. I store this ...
Dexter's user avatar
  • 435
2 votes
1 answer
616 views

Android Movie Class With AsyncTask

I've got a class called Movie and within this class I use an AsyncTask to get a Bitmap from ...
Steve's user avatar
  • 21
2 votes
1 answer
121 views

Asynchronous login form handler

I have an app that user submit the log in form , when it sent the data to server app create a connection for its account. In this connection i have an integer field named as state. the state value is ...
YFeizi's user avatar
  • 123
5 votes
1 answer
6k views

AsyncTask which allows to handle exceptions on UI

The AsyncTask available in android, gives you the result from doInBackground on the UI thread so that you can update UI ...
Ammar's user avatar
  • 431
4 votes
2 answers
323 views

Fetch details from server

I am using this code to fetch some details from server from my android app. How can I improve it? Here I am also transferring some data from one activity to another. This is how I have written my <...
Amit Anand's user avatar

15 30 50 per page