Questions tagged [android-background]

370 questions
0
votes
1 answer

Android: Generate Background shape with specified color bottom

I want to generate background drawable shape which has grey color and bottom is 2dp thick and of black color. I have tried the following
LearningBasics
  • 660
  • 1
  • 7
  • 24
0
votes
5 answers

Android: Border for linear layout not displayed

I am using the following code
user3726986
0
votes
2 answers

Android Background service consuming lot of RAM. How to fix this?

I am fairly new to android coding. I have created an app that will continuously change the wallpaper of the device after certain time. Wallpapers are picked from a folder on SD card. It took me 2 months to develop this app since I have very little…
0
votes
2 answers

Receive the broadcast,when activity in background

I need to display the dialog on every 5 minutes in the Activity1. So sending broadcast every 5 mins from Thread T and register the receiver in Activity1. So every 5 mins Activity1 receive the broadcast and shows the dialog. It's fine. But if i goes…
krish
  • 213
  • 1
  • 10
0
votes
1 answer

Is there another way to create a backrground task without using AsyncTask?

I have an app that can download data from URL by using HttpURLConnection. I have tried using AsyncTask to create a background task, but it's not effective to pause and resume the download. It can cancel the download only. I thought there is another…
Anggrayudi H
  • 14,977
  • 11
  • 54
  • 87
0
votes
1 answer

My app drains a lot of battery in background

I'm developing an application that it use the geolocation. The problem is that when the user doesn't close it and the app is in background, it drain a lot of battery and I don't know where is the problem. My location activity is this: public…
Yeray
  • 1,265
  • 1
  • 11
  • 23
0
votes
1 answer

Android TextView with parallelogram background

I want to achieve the following effect. i.e. a TextView with a parallelogram background. I cannot use a 9-patch as the color of the background is to be dynamic. The ideal scenario would be to have a custom TextView with the background already…
0
votes
1 answer

how to choose color for slidingdrawer

I want to make drawer in xml with backcolor, and when I open the drawer, I see the backcolor, but if I didnt open the drawer I dont see the backcolor. This is what my xml looks like-
Yagel
  • 1,184
  • 2
  • 18
  • 41
0
votes
1 answer

How to create service likes of viber ,facebook which runs continuosly in background?

I am trying to make app which uses services.But i need services to run continously.I dont want it to be stop if i use 3rd party app such as 360 security ,task killer.I have created my services like this way.Thanks in advance. @Override public…
0
votes
1 answer

How to notify when wifi is switched on (/off) by a foreground app?

I'm trying to run an app in background which tells me when the status of wifi is modified; public class BackgroundJobs extends Service { public int onStartCommand(Intent intent, int flags, int startId) { Log.i("BACKJOBS", "here we are"); …
elmazzun
  • 1,066
  • 2
  • 18
  • 44
0
votes
1 answer

Using RoboSpice support for offline background task {combining countdowntimer with robospice}

I am performing an activity that takes long time(offline). I am sending and receiving(reading) sms in my app for this i am using a count down timer class which has a listener onTick() and onFinish(). in the onTick() listener i am checking if there…
0
votes
1 answer

Cannot run the async example ..?

When i tried to run the code, only main toast is running. Progress Dialog and other toast message is not running.This program is simple async example for sleeping process.The main issue is that it is not showing the Progressdialog. Did i need to…
0
votes
0 answers

Strange Behaviour of backgroundcolor in custom listview (nolarge dataset)

code to custom list adapter view (this list has only 11 items) and viewholder is not helping here. @Override public View getView(int position, View convertView, ViewGroup parent){ LayoutInflater inflater = (LayoutInflater)…
devprashant
  • 1,285
  • 1
  • 13
  • 23
0
votes
0 answers

Null pointer when setting text/background on android app

For some reason, I am getting a Null pointer exception when I run my app. It works fine until it hits my "ExamActivity" activity. The code i just added is supposed to change the background(according to a vaiable called "gender) and text (according…