Android :: Reliable Repeating Background Task?
Aug 31, 2009
I'm trying to run a background task which runs every minute or so for an android application but I am struggling to ensure that the task actually runs every minute. I've tried a variety of approaches from using SystemClock.sleep() to the AlarmManager (both repeating alarm and a fixed alarm) but it seems that unless the device is charging any kind of repeating system has a variable repeat rate once the device is unplugged. Is there any way to run a stable consistently repeating service?
View 2 Replies
Nov 3, 2009
I am looking for an organiser with repeating tasks so I can set my tasks I need to do everyday to repeat and still be able to add one off tasks to the same day. Does anyone know of an app to do this?
I had an app on my old phone that automatically popped up a list of things i wanted to do everyday and then I added anything extra for the day. Then as i completed them it removed them for the current days to do list but kept it repeating in the next days list etc...
View 2 Replies
View Related
Nov 2, 2010
I've used the following code to repeat the image in the background but its not working code...
View 1 Replies
View Related
Jan 14, 2010
There seems to be a couple of ways to go about having a background task being executed. My usecase is to have my app fetch a datafeed every x minutes, regardless of my gui is running, and regardless of whether the phone is sleeping or not. I use an alarmmanager to schedule an intent matching a broadcastreceiver. in the onRecieve method i start a service (startService), which spawns an AsyncTask. The task fetches data and stores it and then stopSelf() the service.
in the onRecieve method i aquire a PARTIAL_WAKE_LOCK, before starting the service, and just before calling stopSelf() in the service, i release it again. Is this really the best way to do it? Do i even need the service in this scenario? I experience odd behaviour with this setup, where the setup works for hours and then suddenly stops, which makes it very hard to debug. Does anyone have a simple foolproof method to achive the same end?
View 1 Replies
View Related
Nov 9, 2010
I have a task which I need to run in the background in my Android app. It reads data over the network and populates a database. It can take several minutes to run.
Once it's started, it needs to complete successfully without interruption. (Otherwise I'll end up with a broken half-populated database.) I realise I can never guarantee it will always complete, but I want to make it as hard as possible for the system to kill off this task. For safety I guess I will have it populate a temporary database, and then only swap out the old database for the new one on successful completion of the import.
It's a modal operation; it does not make sense for the user to be interacting with the app while the import is in progress.
My first attempt is using an ASyncTask with a Progress dialog to achieve the modality, but this obviously breaks the "don't interrupt" requirement. I could work around the screen-rotation issue with ASyncTasks, but I don't think that goes far enough.
At the moment I'm not sure if this should be an ASyncTask, a Service, an IntentService, some combination of these, or something else entirely.
View 2 Replies
View Related
Jul 16, 2010
I have an application which requires a login at the beginning (this is the first activity). When the user logs in, I keep his credentials in the application (I extended android.application to add a field called 'key'). I would like to clear this field from memory (from application instance) an go back to the login activity.
I see the following possibilities: - Add a broadcast receiver to catch all possible event (call, click on menu, click on back, lock the phone ...) which clear the key field and launch the login activity - Use clearTaskOnLaunch for all activities except the login activity. But then until my application takes the focus again the key stays in the application object. (It seems it doesn't work with the go back button, maybe I need to use no history also) - Detect for each activity in all onPause or onStop events when application will leave the foreground to clear the key field and launch the login activity
The best would be to have a kind of OnPause method at application level but I think it doesn't exist.
View 9 Replies
View Related
May 5, 2010
When I kill tasks in ATC and then hold the home button, it still shows apps running. What's up with that?
View 10 Replies
View Related
Aug 4, 2010
Say that the user has started my App and then switched off to use the Browser (so we have 2 sets of Tasks running). After a while, something happens to my app that requires the user's attention, so it posts a notification to notify the user. Is there a way to bring my App's task (and the Activity on top of the stack) out from the background when user clicks on my notification?
View 2 Replies
View Related
Jul 23, 2010
The official documentation describes tasks as follows: All the activities in a task move together as a unit. The entire task (the entire activity stack) can be brought to the foreground or sent to the background. Suppose, for instance, that the current task has four activities in its stack three under the current activity. The user presses the HOME key, goes to the application launcher, and selects a new application (actually, a new task). The current task goes into the background and the root activity for the new task is displayed. Then, after a short period, the user goes back to the home screen and again selects the previous application (the previous task). That task, with all four activities in the stack, comes forward. Is there a way to programmatically detect when the task of the current Activity moves into and out of the background? I would like to know when the user has switched switched to another application, vs. when the user navigated to another Activity in the current app.
View 2 Replies
View Related
Jan 30, 2010
I wish to have one application that runs in the background, which knows when any of the built-in applications (messaging, contacts, etc) is running. So my questions are: How I should run my application in the background. How my background application can know what the application currently running in the foreground is.
View 4 Replies
View Related
Sep 29, 2010
I download some data from internet in background thread (I use AsyncTask) and display a progress dialog while downlaoding. Orientation changes, Activity is restarted and then my AsyncTask is completed.I want to dismiss the progess dialog and start a new Activity. But calling dismissDialog sometimes throws an exception (probably because the Activity was destroyed and new Activity hasn't been started yet).What is the best way to handle this kind of problem (updating UI from background thread that works even if user changes orientation)? Did someone from Google provide some "official solution"?
View 1 Replies
View Related
Apr 24, 2010
I've got an Android activity which grabs an RSS feed from a URL, and uses the SAX parser to stick each item from the XML into an array. This all works fine but, as expected, takes a bit of time, so I want to use AsyncActivity to do it in the background. The line items = parser.getItems() works fine - items being the arraylist containing each item from the XML. The problem I'm facing is that on starting the activity, the ProgressDialog which i create in onPreExecute() isn't displayed until after the doInBackground() method has finished. i.e. I get a black screen, a long pause, then a completely populated list with the items in. Why is this happening? Why isn't the UI drawing, the ProgressDialog showing, the parser getting the items and incrementally adding them to the list, then the ProgressDialog dismissing?
View 3 Replies
View Related
Mar 27, 2010
I have an HTC eris and lately I've been having an issue with atm. Every time I have it kill my tasks it takes me to the HTC screen (the one that appears during start-up) and then "please wait" appears with my wallpaper in the background. It does still kill the tasks however it has never done this before and it seems abnormal. Ive heard that task managers can be bad for your phone?
View 10 Replies
View Related
May 21, 2010
I downloaded AK Notepad because I needed an app to quickly jot down things, and it also came with an alarm, which is nice, but it only alerts you one time with one little noise. First of all, is there a way to change this to a repeating alarm? If not, what is the best app for an alarm clock that continues to ring after 1 ring?
View 1 Replies
View Related
Aug 25, 2012
I'm writing an android program for adding task and deleting task in listview. I've add an onClickListener to the delete button so it can delete the task. However I was told I should not have the listener in the adapter violating mvc. how I can remove a task in my TaskListItem class. I got the method removeTask() in the adapter, but don't how I can use it in the TaskListItem class.
Code:
public TaskListItem(Context context, AttributeSet attrs) {
super(context, attrs);
mContext = context;
[code]...
View 1 Replies
View Related
Jul 25, 2010
I'm writing something like a reminder for users. Users will set reminders for their events, when the time comes, a repeating alarm will be set to trigger a status bar notification. But the alarm seems non-stop after I selected the notification or cleared the notification. I am not sure where to cancel this repeating alarm. Below are some of the codes...
How can I stop the alarm when the user selects the notification or clears it?
View 1 Replies
View Related
May 13, 2010
I'm having trouble creating a layout with two backgrounds that tile in the x direction but not y.
I've mocked up what I'm trying to create here...
http://img153.imageshack.us/img153/6008/cnbackground.png
So the top section repeats horizontally, then there's a flat creen section in the middle in which I will center my content, then there's some horizontally repeating grass along the bottom.
View 1 Replies
View Related
Mar 4, 2010
Can someone get me started on how to set a repeating alarm so that it fires at a specific time on a specific day of the week. For example, I would like an alarm to trigger an intent every Monday at 8am.
Looks like a lot of apps do this (e.g., Locale, Alarm Clock, etc.)
View 3 Replies
View Related
Dec 12, 2009
Is there an app for choosing which apps you want to use that are already open or whatever. Or is there a button you can press to bring up a task list like you do with you blackberry when u hold the blackberry key and the list of open apps comes out.
View 5 Replies
View Related
Dec 27, 2009
Automatic task killer, advanced task killer, or something else?
View 18 Replies
View Related
Feb 14, 2010
I just downloaded "missed call". HThe program is set for repeating alerts every 2 minutes, After I receive a missed call , how do I stop the alerts?
View 2 Replies
View Related
Nov 3, 2009
does android have a repeating audible notification for missed calls/sms etc.?
View 5 Replies
View Related
May 30, 2010
If I want to mark the second item I'm doing the following code: This code is from my Adapter that extends ArrayAdapter :if (convertView == null) { LayoutInflater mInflater = (LayoutInflater)getContext( ).getSystem Service (Context.LAYOUT_INFLATER_SERVICE); convertView = mInflater.inflate(R.layout.channel_list, null); MyContent o = items.get(position); if (o != null) { TextView tt = (TextView) convertView. findViewById (R.id.toptext) ;TextView bt = (TextView) convertView.findViewById(R.id.bottomtext);if (tt != null) {tt.setText(o.Top()) ; if(bt != null){bt.setText(o.Bottom());} if(position == 2) { convertView.setBackground Color(R.color.selectem_color); return convertView;It will show the list view but mark every 9'th item after this item (the 11'th item 13'th and so on).Does anyone know what's the reason?
View 2 Replies
View Related
Oct 11, 2010
I am looking for a simple app to remind me if I have a missed call with a notification sound configured to my preferences. In other works remind me ever X min with sound Y.
I have read a lot of issues with Missed Call so I haven't even tried that one. Anyone having any luck with this app?
I installed executive assistant which does the job very nicely but it also does a LOT more that I don't need/like. I just want something light weight and simple.
View 7 Replies
View Related
Nov 7, 2009
I've been using Task Panel X and Advanced Task manager to kill unneeded tasks and keep memory at a maximum.
Recently, every time I open Task Panel X and then revert back to Home screen I get the HTC logo and then a loading screen while the device sets itself. This happens even if I kill NO tasks.
So my solution was to uninstall Task Panel X and then use just Advanced Task Manager. All the sudden, same result.
Everytime I open either of these apps and then go back to home screen I get a BLACK SCREEN WITH HTC LOGO, THEN A BRIEF (10 SECONDS) LOADING SCREEN. THEN ALL IS NORMAL.
View 7 Replies
View Related
Feb 9, 2009
I'm looking for a way to trigger repeated actions. I'd like the user to be able to choose the intervals at which these actions will be executed. One should be able to choose from intervals like "Every Day", "Every Month", and "Every Year". The setRepeating(int, long, long, PendingIntent) method of the android.app.AlarmManager class only supports a long value for choosing the interval between the execution of the pending intent. My problem now is, that I can not just compute the number of milliseconds that "fit into one day", since not all days have the same length (daylight saving). This is also a problem for the interval type "year" (leap years).
I had a quick look at the android.os.Handler class, but as I understood the documentation I'd need to keep a service thread running for my actions to be executed at some future time. I don't consider that a good option for my needs ;-) Is there anything in the API I could configure with a cron expression or the like? I was also thinking about scheduling an alarm with the AlarmManager for a single execution at a given date/time and then having a receiver that does the rescheduling according to a cron expression attached to the intent. But I don't know if I just got something completely wrong here and I'm reinventing the wheel with that approach
View 2 Replies
View Related
Oct 8, 2010
I think it's a common problem. I'd like to sell my apps, but my country is not supported for merchants already. Do you know a reliable app store where I can sell apps?
View 4 Replies
View Related
Dec 11, 2009
I know this was talked about before at different times but I still have 3 questions.
1. what is the difference between a task killer and a task manager?
2. should we be using one of these apps or not?
3. when you look at the awake time if it is like 70% or 80% and you aren't using the phone a bunch I take it that means something is running,how can you find what is running.and is the awake time that big of deal?
View 27 Replies
View Related
Oct 15, 2009
Looking for a guide on how to use task killer. I had task killer on and deleted it. I think I was killing tasks that were needed to keep certain functions running that I use frequently. If someone would take the time to help me understand how to use one, I think I would be much more successful with it.
example - text messaging just stopped ( werrent receiving them ) . Once I took task killer off, everything started working again.
View 7 Replies
View Related
May 21, 2010
Was updating my apps to back up in TiBa to install SS when I noticed Google Voice updated. From channelog:
Quote:
View 3 Replies
View Related