Android :: Alarm Manager Broadcasts Canceled When Application Killed?

May 15, 2010

I have two BroadcastReceiver registered. When the app is closed they both fire at the appropriate times and do the appropriate things. If the app is closed then killed (say with an AppKiller), the receivers never receive their broadcasts, and nothing happens. Presumably the same thing happens if the parent app is killed due to low memory, so how do I ensure those broadcasts are fired/received. The API states that even if the app is killed it should fire, does anyone else have experience with this situation? If it helps my manifest is:

<!-- receivers for AlarmManager -->
<receiver android:exported="true" android:label="Shift roster updating calendar."
android:name="com.skooter.shiftroster.backend.service.UpdateCalendar" >
</receiver> <receiver android:exported="true" android:label="Shift roster checking alarm."
android:name="com.skooter.shiftroster.backend.service.SetWakeup" >
</receiver>
and nothing esoteric is going on in the AlarmManager/BroadcastReceivers

Android :: Alarm Manager Broadcasts Canceled when Application killed?


Android :: Alarm Is Canceled If App Is Stopped

Oct 12, 2009

I have an app that does some polling every 2 hours. I set a repeating alarm that starts a service but I have noticed that if I use some task manager (e.g. TasKiller) to kill my app then the polling will not be performed from that moment on. I know this because I store the time of the last poll, I have also checked the server logs and there are no requests received from the client after I force close my app. Is this the way alarms work or should I look somewhere else for a crash or smth? because if alarms really get canceled then how should we implement the polling?

I'm also interested in what happens with a running service if it gets killed from another app (I assume all task managers are using ActivityManager.restartPackage() to kill other apps), does it get restarted?

View 1 Replies View Related

Android :: Alarm Clock Broadcasts Any Intents?

Feb 11, 2009

Does the Alarm Clock broadcast any intents? I would like to be able to have my application automatically launch after a person's alarm clock goes off, and they press "dismiss" (rather than "sleep"). I assume that would require a receiver looking for a broadcast of some kind.

View 2 Replies View Related

Samsung Galaxy S :: Alarm Canceled But Still Goes Off At Set Time

Nov 12, 2010

I've experienced the following problems in 2.1 and had hoped that it would be rectified in 2.2. FYI I'm using a UK unbranded SIM free SGS and the stock alarm with the smart alarm feature turned on. When I set the alarm for the morning and then cancel it later on (e.g. I wake up naturally an hour before the alarm) I find that despite canceling it the alarm still goes off at the initially set time.

First of all, I was simply unchecking the green alarm symbol in the "clock" application. Then as this was failing to cancel it, I would long press the set alarm time until the option delete would appear and completely deleting the time altogether, yet the alarm still goes off. I have also noticed in 2.2 that the alarm date does not seem to be as intuitive as it was before. Previously I recall setting the alarm the night before by scrolling the time forward past midnight to the morning and the day would follow suit.

However, a couple of time that I have used the alarm the alarm has tried to enable itself for the same day as being set. However, as the clock is being scrolled forward this would often show as time to alarm 6+ days and hours. Don't recall seeing that on 2.1? Finally, is there a dedicated place where more smart alarms can be downloaded and incorporated into the smart alarm feature? I know of Zedge, White Noise and others but most are not true smart alarm sounds. Often just screen shots or clips of noises, which do not segway nicely into the start of the alarm loop when the track has completed.

View 6 Replies View Related

Android :: Prevent App / Service From Being Killed From Task Manager?

May 7, 2010

It is very important that my service stay running until someone with a password stops the service from my UI screen. My app runs great but it is designed to be turned on/off by parents (with a password) on their kids phones. I have managed to make everything work but the problem I'm having is that if the kid uses a task manager to kill my service then my app is useless. I would be grateful to anyone who knows a way to either

1) monitor the service and start it back up automatically if its "killed"
or
2) prevent someone from being able to kill it except from the activity (administration screen) that launched the service. Or both?

View 2 Replies View Related

Android : Closing Activity Completely / Process Killed By Activity Manager Service

Aug 2, 2010

Whenever the memory needs to be reclaimed, the process is being killed by Activity Manager Service in killPidsForProcess. I have a back button in my activity window on right corner of the title bar.

I want to kill the activity completely on clicking the close button. Can I reuse the same function and will it have any major effect? Please help me out in this.

View 3 Replies View Related

Android :: Pass Values In Alarm Manager?

Sep 7, 2010

How can we pass the value to receiver...i am using alarm manager...

View 1 Replies View Related

Android :: Test Application Killed / But It Got Intent

Dec 8, 2009

I created application with name Test, and has a class that extends broadcastreceiver that listen for PACKAGE_RESTARTED. I use Advanced Task Killer, and killed the Test application. But when I kill another application, for example gmail, the Test's broadcastreceiver got the intent (I logged it). Does it means that broadcastreceiver will never died?

View 4 Replies View Related

Android :: Stop An Application If Any Of Activities Were Killed By OS

Sep 10, 2010

I have an application with many forms implemented as separate activities. The form variables are dynamically built based on a database, and there are a ton of variables in the C++ side of the application (accessed via JNI). I don't see how saving out all of this data to persistent storage each time the onPause() or the onSaveInstanceState() of one of these many activities goes into the background is a smart use of processor time. And I don't see how even if I save the local variables for each activity during that time I'd be able to restore a single activity within the context of all the others.

I have set up a service that auto saves the files when I detect that the app has gone into the background. (I set a time stamp when onPause() is called in any activity and then clear the time stamp when onResume() is called on any other activity. If the time elapsed is more than a few seconds, I know I'm not the top activity any longer and the service saves the files).

What I'd like to do is continue on as normal unless the OS kills one of my activities. Since we don't always get notified of this, I thought it would be nice if there were a way to tell the OS that I'd rather you kill the whole app than just one activity.

View 1 Replies View Related

Android :: Froyo - Killed Application Detection?

Jul 29, 2010

On Froyo, we found that some new "Task Manager" apps are now using the ActivityManager.killBackgroundProcesses() to kill apps. When this happens, Intent.ACTION_PACKAGE_RESTARTED is no longer fired. How can I find out that my application has been killed? I tried to start a service, and I do see this message printed in logcat:

W/ActivityManager( 2426): Scheduling restart of crashed service com.example.android.apis/.app.RemoteService in 20000ms

However, the service is never restarted as advertised, if the app is killed using the killBackgroundProcesses API. (If I go into adb shell and kill the service process, the service will indeed be restarted ...) This looks like a bug anyway, because the notification created by the app is no longer removed like in eclair (the StatusBarService, and a bunch of other system services, depend on the Intent.ACTION_PACKAGE_RESTARTED broadcast).

View 14 Replies View Related

Android :: GPS Application Gets Killed On Screen Timeout

Apr 9, 2009

I can see on OMAP zoom2 platform, the moment screen timeout happens my application is getting terminated. I have a Google map based LBS application which is running on Zoom. I have implemented the interfaces given in gps.h to libhardware_legacy/gps.cpp .

GPS application talks to android framework and Framework talks to libhardware to get the GPS info. Now I can see that the moment screen timeout happens and the display goes off, my application killed. Actually from the framework the stop interface (hgps_stop() ) gets called on screen timeout.

I am wondring why this is happening, as I am not sending any stop request form my GPS application to the libhardware.

Is it something related to Android power manager, that android Power manager does not know about my application is running?

View 2 Replies View Related

Android :: How Can I Reliably Test Alarm Manager On Device?

Aug 5, 2010

I'm writing an android application that depends on network activity and the alarm manager sometimes waking the phone up from a sleeping state. My question is how can I reliably test this on device? Ideally, how can I force the phone into a full-on sleeping state. Failing that, how can I know for sure when the phone has fully gone to sleep? How do you test your Alarm Manager / Wake Lock / Sleep handling code?

View 2 Replies View Related

Android :: How To Reschedule Alarm Manager On Preference Change?

May 25, 2010

I have an Android Service. When a phone boots up, a broadcast receiver receives a notification and it schedules the service to run repeatedly at a gap of X minutes. Henceforth After every X minutes another broadcast receiver gets those notifications and kicks the service off, which does it's job and quits. So far so good. Now I want those X minutes to be configurable. I have a perf.xml similar to what is given at the link below. This XML captures all my preferences along with that of service timer. http://android-journey.blogspot.com/2010/01/for-almost-any-application-we-need-to.html Now when user changes preferences; how can I reschedule the alarm? Is there a way I can set a listener on preferences change? I have used only XML files to speficy preferences screen. Code...

View 1 Replies View Related

Android :: Application Gets Killed - Because Provider Is In Dying Process

Apr 9, 2009

After long running the Media|Player (audio mode) the app I'm developing often crashes w/ the following error: > Process android.process.media (pid 14795) has died. > Killing <my app> because provider com.android.providers.media.MediaProvider is in dying process android.process.media

View 3 Replies View Related

Android :: Registered Broadcast Receivers After Application Is Killed?

Mar 25, 2010

Currently my application is configured to always receive the CONNECTIVITY_CHANGED action to force an update if the previous update failed because there was no connectivity. What I don't like about this is that the broadcast receiver gets to be called too many times although it is not needed. I was thinking to register my broadcast receiver only if an update failed using the Context.registerReceiver(BroadcastReceiver receiver, IntentFilter filter) method. But I'm not so sure if this is a good idea. I'm concerned that if my application is evicted from memory the broadcast receiver will be unregistered or lost and my application will not be notified about the future CONNECTIVITY_CHANGED actions. The update is done in a short lived service. So if the update fails, the service will register the broadcast receiver just before it ends its execution time. Can somebody explain what happens to my broadcast receiver after the application is evicted from memory?

View 4 Replies View Related

Android :: Alarm Manager For Multiple Pending Intent Are Not Working.

Aug 16, 2010

In my application i have created pending intent which calls another activity (after 20mins of alarm off) with the help of alarm manger. It should happen each time for each new pending intent or when I call that activity. But when i create one pending intent and after few mins again create new pending intent ,then the last one overlap the other previous pending intents and start specified activity only for ones for the last pending intent.I want that each time i create any pending intent it should start specified activity after 20 mins of it's alarm off time.How it can be done ?

View 7 Replies View Related

Android :: Using Alarm Manager To Start A Service At Specific Time

Jun 16, 2010

I have searched a lot of places but couldnt find a clean sequential explanation of how to start a service (or if thats not possible then an activity) at a specific time daily using the AlarmManager??I want to register several such alarms and triggering them should result in a service to be started. I'll be having a small piece of code in the service which can then execute and i can finish the service for good. Code...

View 1 Replies View Related

Android :: Android Alarm Manager Alarm

May 28, 2009

Do we hear a ringing sound when the alarm manager sets off an alarm. I know its start a intent and that broadcasts to the receiver.. but does there occur a ringing or something similar sound when the alarm goes off.. am developing using and emulator...so not sure.. also i have come to know that vibrator service is not available in the emulator....is there an alternate way to ensure that the vibrator did go off as programmed...am using the vibrator servcie and also setting the vibrator in the notification.

View 8 Replies View Related

Android :: Android - Alarm Statusicon Like Original Alarm Application?

Sep 17, 2010

I am making a alarm app and was just wondering how do I show a alarm icon at the right side of the statusbar like the original alarm app? normal notifications appear in the left side and I cant find anything about this....

View 2 Replies View Related

Android :: Android - Massage Viberator - Application Does Not Stop Vibrating Even After The Process Is Killed

Oct 18, 2010

I will try to be as brief as possible... I have published a very simple android application it's name is "Vib-e-rator PRO". It's purpose is obvious, it can be used as a masssage vibrator or as an erotic stimulator...

My Problem is don't have an Android Phone to test my app in real time.

I have been recieving mixed comments from people. A few users say its working fine. But majority of them complained that the Phone would n quit vibrating even after the closing application.

Later i speculated that when ever the user switched off the vibrator and quit the app it would work as expected. If any user (most of em) directly closed the application ( either through the close option provided in the app itself or by pressing the END button in the phone ) without switching off the vibrator then it would not stop vibrating.

So i added myvib.Cancel() (myvib is the context for Phone Vibrator) in the exit block the close option provided in my app. For the other scenario, when it is closed by pressing the END button in phone, i have no idea how to solve it... So friends please advice me what is necessary to do... The comments i have been receiving from many users of my app is really embarassing....

View 3 Replies View Related

Android :: Want To Relaunch Application When Killed By Android

Aug 18, 2010

I am working on Gps based application which runs all the time in background. But in extreme low memory case(or when i open many apps) my app is killed by the android system. I want to relaunch my app when it is killed by android system.I goggle it for this but don't get any solution.Any help would be appreciated.

View 5 Replies View Related

Android :: SMS Broadcasts And Logs

May 16, 2009

I want to know whenever someone is called, calls, smsed or smses. I figured for the calls I'd use the phone state change to trigger when I should check the CallLog provider again. I couldn't see any direct way of getting broadcasts from the CallLog. Did I miss it?

For SMSes I'm having more trouble. I'd like to know whenever and SMS is sent or received. Being able to receive STATUS_ON_SIM_READ and STATUS_ON_SIM_SENT would be great, but from what I've read in the Sms Manager that would depend on the sending application. I can't seem to find any evidence of a default one that android places when it sends. I also couldn't find an sms log provider or anything similar.

View 2 Replies View Related

Android :: Why Launch Is Canceled

Apr 5, 2010

Why launch is canceled in android

CODE:.........................

View 4 Replies View Related

Android :: Alarm Application

Jul 5, 2010

I have written the code for setting an alarm. I am able to raise a toast successfully from my alarm receiver class when the time ticks off. Now i want to play the default mobile tone as well as vibrate thee phone.

View 1 Replies View Related

Android :: Application To Set The Alarm

Feb 2, 2010

I want to make an application in which i want to set the alarm, so that my application set the alarm directly... for example: I am creating a reminder applicatioin in which i want to set the alarm on a specific time and specific date...

View 2 Replies View Related

Android :: How To Set Alarm Using My Application?

Jan 10, 2010

hi Can anyone tell how to set alarm using my application.. give me the refference of the API

View 3 Replies View Related

Android :: Receiver Not Receiving Broadcasts From Another App?

Jul 5, 2010

App A has this Broadcast Receiver in its manifest (within <application>): Code...

View 1 Replies View Related

Android :: How To Catch Screen On / Off Broadcasts?

Jul 17, 2009

How can I catch SCREEN_ON/SCREEN_OFF broadcasts? I have tried for hours, but failed.

View 10 Replies View Related

Android :: Requesting For An Alarm Application

Jun 7, 2010

I'm looking for an alarm application. I would like the alarm to play a podcast rather than sound an alarm. That way I can wake up to something a bit more interesting than a monotonous beep!

I've tried 'Appalarm', but can't see how to make that work with a podcast. 'News Alarm' is close, but I don't want to dismiss the alarm before I hear the podcast - the whole point is that the podcast will rise me from my sleep gently. Bit like a very simple 'old skool' radio alarm that you can buy from ebay for $1. Makes you wonder why my $500 phone can't do the same thing... (technological progression etc.)...

View 1 Replies View Related

Android :: Alarm Clock Application

Oct 25, 2008

I still have not recieved my G1 and I was wondering if there was an alarm clock application on the phone?

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved