Questions tagged [android-background]

370 questions
0
votes
1 answer

Android Background Service stop in lollipop whille swipe from task Manager

I Have a service in android app and I want to run in the background continuously even app is killed from task Manager.My current code works good for pre-lollipop versions.But in lollipop it is not worked(In lollipop it stops from task manager).How…
0
votes
1 answer

Better way to update PolyLine track from GPS readings

In my app I have a Service which receives location updates and stores them to a database. I also have a Fragment which displays a MapView and a PolyLine of all recorded waypoints from the database. During recording, the Service notifies the…
0
votes
0 answers

How to manipulate .9.png files in Android studio 2.1 +

I am am trying to build a simple chat app where I need to make resizable bitmaps of chat bubbles, after some googling I found in android is handled with .9.png files and I used the draw9patch tool to create all the bitmaps i needed following this…
Fenn-CS
  • 863
  • 1
  • 13
  • 30
0
votes
1 answer

Which is the best way to synchronize Android application data from server?

I have three informative screens like Facebook blogs in my application. Application works Online and Offline. User can see the data offline.the data is Cached in Database. When data is added/updated/deleted to server from active users. The problem…
0
votes
2 answers

How to define color for selected TextViews once in Android?

I have a ListView and created a xml file for ListView items.
0
votes
1 answer

Draw multiple lines on a RecyclerView background

I'm trying to draw multiple horizontal lines on a RecyclerView background. These lines have to be at a precise position, because there is a list of elements which have to fit between them. I could just add the lines to each element but I need those…
Starivore
  • 279
  • 1
  • 13
0
votes
1 answer

Service dies on lock of the phone Android

I have an Android service that should run in background all the time is called from Activity on start like this: ServiceConnection _serviceConnection = new ServiceConnection() { public void onServiceConnected(ComponentName className,…
0
votes
1 answer

Android : The app is to make it finish or stop working in background?

My Android app is very big and complex. Therefor the app use much memory space and CPU. So when user click the "home" or "back" button on Android device, I hope that the app finish completely. Please someone help me. Appreciate that share sample…
Miguel A.
  • 375
  • 5
  • 13
0
votes
0 answers

how do phones running newer Android versions behave with old built apps?

For Example: Android source code from WifiServiceImpl.java left is from Android v22 (Lollipop), right is from Android v23 (Marshmallow) Question: if I build an apk using compile/target sdk 22, and run my application on a phone running v23 and call…
derfect
  • 622
  • 2
  • 6
  • 14
0
votes
1 answer

Background service in android that generates notifications on database change

I am trying to write a service that runs in background and repeatedly calls to a web-service written in PHP. This web-service returns me JSON. I am getting the JSON but unable to fire a notification. My source: public class RepetedHttpCallService…
Soham s More
  • 95
  • 12
0
votes
0 answers

How to proceed timer to run if app minimized in android?

Hi I am working in chat app. I have timer and when customer gives request to expert, the timer starts to run for 1 minute and waits till it get approve. After approved/reject, timer will get cancelled. this works in normal scenario. But when app…
Shadow
  • 6,864
  • 6
  • 44
  • 93
0
votes
1 answer

How to set an android activity/fragment variables when app in backgroud?

In USB camera supported android application. I will make the app to go background when usb camera is connected. when the app is in background, i will disconnect the camera from the device. Next I will re-launch the app from background. After…
0
votes
1 answer

How to set Background and TextColor from Theme in Styles.xml

This seems a pretty basic task, but I can't seem to get it to work. I have several activities that all contain buttons that I want styled the same. I have defined the following styles in styles.xml and applied them as themes to the buttons in…
tallpaul
  • 1,220
  • 2
  • 13
  • 35
0
votes
0 answers

Android Studio Background Color

How to set custom color for a layout? Why i can't fill the color to fullscreen. There are still white space at the edges. I set the height and width to match_parent size, it still the same. screen.jpg My code:
0
votes
2 answers

activity backgrounds in android studio

I have a problem in Android Studio. I try to change the Activity background from another Activity, but when I run the application, it doesn't work and the application closes public class Settings extends Activity { RelativeLayout rl ; …
maysara
  • 5,873
  • 2
  • 23
  • 34