Questions tagged [android-background]

370 questions
0
votes
1 answer

How to create ripple with corner radius programmatically?

There are some similar questions. But they are not resolved! Set RippleDrawable corner radius programmatically I know that this behaviour can be done using xml file. But I must it programmatically. My code is below: GradientDrawable gd = new…
us2956
  • 476
  • 12
  • 27
0
votes
1 answer

Android - How to download a large nos of images (large nos of http url) in Background Process

I am getting a list of image url from server whose count is approximately in between 400-500. How can i download this image in background into local folder of the device ? SO far i have run a foreground service in which i am using ExecutorService to…
0
votes
1 answer

Android APIs for background application statistics?

I'm new to Android development and I'd like to develop an app that shows application statistics, but only for their background runs (with background i mean the app is totally closed, also in the multitasking, and it starts to run for doing different…
0
votes
1 answer

how do I refresh the entire contents of recycler view to default values including the icons they're on except the current position

I have an app where on click of an item I am updating the background image in viewholder in adapter. However, i want to do it such that when I click on one item all other items revert to default images( sort of like toggle back ). Say I have a play…
0
votes
1 answer

MediaPlayer audio playing stops when app enters in background (OREO)

I have a manager class with an array of MediaPlayer instances which is the manager for playing audio on my app. Until now, it worked perfectly in background and keep playing the audio when the device is blocked. Now, starting with Oreo devices, the…
0
votes
1 answer

Displaying the arrow of an Android spinner

I have a spinner, whose background is defined in a drawable file: And the style:
0
votes
1 answer

Android service getting destroyed in sticky mode

Following is my android which is started when a activity button is pressed. But i see that when the activity is killed the service is destroyed. I want the service to be alive all the time even if the app is closed/killed/cleared. public class…
user93796
  • 18,749
  • 31
  • 94
  • 150
0
votes
2 answers

AsyncTask is not working as expected in Android

GetImages getImages = new GetImages(); getImages.execute(keys); private class GetImages extends AsyncTask(String, Void, Void){ @Override protected void onPreExecute() { …
0
votes
0 answers

How to reset/restart the app when onTrimMemory() method is called?

Currently I am handling onTrimMethod(int level) in my app with ComponentCallbacks2.TRIM_MEMORY_COMPLETE and ComponentCallbacks2.TRIM_MEMORY_RUNNING_CRITICAL. I get this callback easily with low end devices when my app is running in background and…
0
votes
1 answer

Is it a good practice to use GPS in the background every 10-15 seconds?

I'm developing an android app fully based on user location, so I would like to receive the coordinates as frequently as possible. For this case I decided to create a service that will run in the background (looping) and use user GPS and NETWORK…
SET1
  • 29
  • 4
0
votes
2 answers

When I clear all recent apps, android system kills my app service on Android v7.1.2

enter image description hereI want to create an app which runs in the background. I have tried all stackoverflow solutions. Those solutions are all working when the app is cleared by myself. But when I'm performing "clear all recent apps". The…
0
votes
1 answer

how to know AsyncTask working in background or not?

I am calling one webservice in home page in that i will send all the details in that this process is working in bacground. when i come to this home page again i want to know prvious AsyncTask is end or not what iam doing exactly here …
0
votes
1 answer

How to listen/intercept phone calls for Oreo onward?

How to listen Phone calls for Android version Oreo onward limits for background service. Looking for working examples. Note: Application may not be in foreground state.
0
votes
1 answer

Android migrate background service to jobscheduler

we have a project which uses background service to retrieve real-time events from server. we use s websocket connection to retrieve data. but now in Android Oreo or higher, os starts to showing battery Warning. my concern is that if we migrate to…
user3892282
0
votes
0 answers

Android permanent service for notification without FCM/GCM

I have an application running on an industrial Android handheld, on client premises, wifi, no internet. The app communicates with a REST API with our in-premises server. I'd like to add a notification system to this app, even simply a polling of the…