Questions tagged [android-background]

370 questions
3
votes
1 answer

Android periodic work friendly to doze mode and app standby

I'm trying to found a best way to perform periodic work in android that will play nicely with doze mode and app standby. I've tried WorkManager with periodic request, it works fine at the beginning (for 15 mins requests) but the time slots…
Dima
  • 101
  • 7
3
votes
0 answers

Xamarin Forms Background Transfer Service for Android

I’ve written an App that uses NSURLSessionUploadTask to upload data to a web service. This is first written to the file system and then handed off to iOS so that the upload will happen in the background. I need to do something similar with Android,…
markpirvine
  • 1,485
  • 1
  • 23
  • 54
3
votes
1 answer

Why is my Notification not shown when created from asynchronous background service callback?

I have created a Service, not an intentservice since i need to do some asynchronous stuff (location + server call), and finally create a Notification. I first had a broadcastreceiver that created the notification, nothing more. That works fine.…
3
votes
0 answers

start android background service on available internet connection?

I know about the update starting from api24 which states that a background service can't be launched based on network change and that there should be a foreground activity. So I've tried using jobscheduler but it only works on api >= 21 so in order…
3
votes
0 answers

Android App hang( losing activity context) issue if open from background after long time?

In my android application I have an issue in which if I open app from background after some time (2 or 3 hour) , that time my app got unresponsive. I have checked log cat regarding this and came to know that where ever I am using Context of activity…
3
votes
2 answers

How to change TextSize and Background Color of a spinner

I want to change my spinner background color and text size of each item in the Spinner, i already have gone through few answers for questions similar to mine but did not get the answer weather we can change the textSize / Background Color of a…
John Kiran
  • 79
  • 1
  • 14
3
votes
1 answer

RelativeLayout background drawable overlap content

I have a 9-patch drawable(date_time). And i want to place this drawable behind Relative Layout content, so all child views should be drawn on top of this image. Here is xml Layout:
Anatol
  • 941
  • 1
  • 7
  • 13
3
votes
1 answer

App makes the apps screen slow

I am making a basic app in which the users can check their "dinning balance", i managed to do this by parsing the proper web page. My app works just fine, but i found that when i exit it, the Current Running Apps Screen (Android app manager) goes…
3
votes
1 answer

Process data stream and create records in the background

I have created an application that does the following steps very well - Connects with the Remote Device (SPP) using Bluetooth socket . Then listens for the stream coming from the remote bluetooth device in a separate thread. Then when data stream…
sjain
  • 23,126
  • 28
  • 107
  • 185
3
votes
0 answers

Retain android background service in background when app closes

I have implemented a background Service that is running in the same process as my app. My problem is that when the app is closed (tab on windows button, then swipe app to the left to close it), it causes the whole process to close and the Service to…
3
votes
4 answers

How to make a view as always on top?

I have a TextView and it is on an image. When I click the button, TextView's background color will change, but image won't disappear. For example: My TextView at the beginning: When I click a button:
Utku Soytaş
  • 1,475
  • 2
  • 19
  • 30
3
votes
3 answers

Start Application At boot time

I want to start my app at boot time, but want activity run in background at that time... I have implemented BroadcastReceiver class for this, which is: public class StartMyServiceAtBootReceiver extends BroadcastReceiver { @Override public void…
Naveed Ali
  • 2,609
  • 1
  • 22
  • 37
3
votes
0 answers

android listview selector state_selected becomes transparent

After going though all the related questions and talking to some expert developers I still can't figure this one out. My problem is, that when a group item in an expandable list view is selected using setSelected from the adapter, it's background…
3
votes
1 answer

EditText - change background color of text (and only text - not the whole view)

When a user enters information in an EditText, and moves to the next EditText, the information is highlighted as shown below: The code for this: edittext.setOnFocusChangeListener(new OnFocusChangeListener() { @Override public void…
Tom
  • 561
  • 8
  • 16
2
votes
1 answer

How to `fitHeight` a drawable (VectorDrawable/BitmapDrawable) in XML resource

I am trying to fit a drawable (VectorDrawable/BitmapDrawable) that got a 1:1 aspect ratio on first frame of Android. I tried the following attempt without success: styles.xml