python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Simple asynchronous web request that does not get lost on activity state change
I'm trying to figure out how to properly do an asynchronous web request on Android in such a way that when the response comes back, it doesn't get lost if the activity got destroyed and recreated from...
AxiomaticNexus
Votes: 0
Answers: 1
Android - Why All variables, views declared on Activity is getting null in onRestart() method after screen unlock on Android OS 11?
I am trying to develop a application but I got stuck in a case that I mentioned below :
1. I am in an Activity of my application.
2. My screen turned off (locked) after 5 min
3. I unlock mobile
4. Aft...
Jayesh M
Votes: 0
Answers: 0
What is the best way to declare a variable for a TextView that changes during lifecycle of Activity?
I decided to learn how lifecycle of an Activity works via changing different properties of a simple TextView at each stage of a cycle. I wanted to know what is the best way to declare a variable for t...
KosmoKamikaze
Votes: 0
Answers: 1
Fatal Exception: android.app.ForegroundServiceStartNotAllowedException even when app is not in background
I have this piece of code on MainActivity that starts a foreground service when the app is resumed.
private final Handler handler = new Handler();
private final Runnable runnable = () -> {
In...
lubrum
Votes: 0
Answers: 0