Android :: BroadcastReceiver To Restart Killed - Crashed App?

Sep 14, 2010

I have an application and I would like to be able to restart it on the event of an error or a crash/app shutdown. I am familiar with how to register BroadcastReceivers, use alarms, etc.

Is there any signal I could intercept that the app sends out when it shuts down? Or that the OS sends out when any app shuts down?

Android :: BroadcastReceiver to restart killed - crashed app?


Android :: Scheduling Restart Of Crashed Service - But No Call To OnStart

Mar 7, 2010

In the 1.6 API, is there a way to ensure that the onStart() method of a Service is called after the service is killed due to memory pressure?

View 4 Replies View Related

Android :: Scheduling Restart Of Crashed Service - Need Call To OnStart?

Mar 7, 2010

In the 1.6 API, is there a way to ensure that the onStart() method of a Service is called after the service is killed due to memory pressure? From the logs, it seems that the "process" that the service belongs to is restarted, but the service itself is not. I have placed a Log.d() call in the onStart() method, and this is not reached.

View 1 Replies View Related

Android :: How To Automatically Restart Widget Update Service After Killed?

Sep 5, 2010

I have an app widget that uses a Service to handle updates (as per the SDK sample). If a task killer kills the service, the widget obviously stops updating. Is there any way I can notify the widget that the service has been killed so it can attempt to restart it?

View 3 Replies View Related

Android :: How To Restart Scheduled Jobs No Phone Restart

May 15, 2009

I am developing a ToDo reminder type of app for android. on creation of a new reminder an alarm and vibrator scheduler is created with a toast. This works on intents and broadcasts and is pretty straight forward stuff with putextras using the reminder id from the db. My problem is, if some one restart the phone, i guess all the scheduled alarm and vibrator tasks for the reminder will be killed. Once the phone restart again how to recreate the scheduler tasks.

View 2 Replies View Related

HTC Droid Eris :: When Aps Restart My Phone It Takes About 15 To 20 Seconds To Restart

Apr 20, 2010

I have noticed that when aps restart my phone, it takes about 15 to 20 seconds to restart When i Power down, it takes MINUTES!Does anyone know of simple restart app I could use to avoid this? If not, anyone know someone who could make one?

View 3 Replies View Related

Android :: Trying Out An App / It Crashed Phone

May 15, 2010

I was trying out an app, I think it's called Continuous Photo and it completely crashed my phone. I can't turn it on. I plugged it into the wall to see if that would help and it made the sound that one would expect when it's charging and the home, menu, and return buttons all lit up, but not the screen. It's a brand new phone that I've only had for 4 days. Is the problem, that I tried to complete a function using the app, that I didn't have enough memory for? No matter what the reason is, how can I fix it? I'm freaking out here.

View 3 Replies View Related

Android :: App Got Crashed On SDK 1.5 - Working Fine On SDK 1.0

May 11, 2009

I have developed an application which has tabActivity using SDK 1.0 r2.

1st Tab contains List view. -> the list contains some images

2nd and 3rd contains some webviews.

The app works fine on G1 mobile.

Today I downloaded SDK 1.5 and ran the same app on SDK 1.5.

The app got crashed when I scroll down/up the list items very fast (fling)

code:............

I am not understanding the above error log.

Then I experimented some thing like this: I removed the TabActivity, just shown only list activity. Then I scroll down/up the list items. Then there is no crash.

View 8 Replies View Related

Android :: Red Droid Crashed Phone / Need Another

Oct 12, 2010

Don't download Red Droid! aka Red Tube! I downloaded this application and it crashed my phone. Have to get another one.

View 5 Replies View Related

Android :: Notifying That The Dawvik Vm Has Crashed

Sep 17, 2010

I have a situation here where i have an intent A that calls intent B. In Android 2.x, the application B consistently crashes the dawvik virtual machine when it runs the second time. Then, if A calls B again, it works.

Is there a way to let A find out that the vm has crashed? This way, i could just redo intent B.

View 3 Replies View Related

Android :: SMS Using BroadcastReceiver

Mar 5, 2010

I am writing my own sms receiver app and i want it to catch all the sms using a broadcast receiver. This on its own, is no problem, but i want to be able to stop the message being passed to the messaging app.

View 2 Replies View Related

Android :: Phone Crashed Constantly After Froyo

Sep 21, 2010

Ever since Froyo, I cannot text, email, and my phone crashes constantly.

View 1 Replies View Related

Android :: How To Find Place Where Application Crashed

Aug 31, 2010

How to find out line of code where application failed in Android? (without debugging just to see crash dump)

View 3 Replies View Related

Android :: Service (Run Forever) Crashed - No Longer Want

Jul 21, 2010

We have a Service that continuously collects sensor data on the phone. This service should run "forever", e.g. as long as the user wants, and not be killed by the system. For clarification, this service is not intended for an app to be released in the market to the general public, it is written for a scientific study. So the people running the app are fully aware that their battery will sucked empty faster than usual, this is no problem. Anyways, my problem is that the service gets killed after a while of running. Sometimes after an hour, sometimes only after like 7 oder 10 hours. The Log-Entries when the service gets killed look like this. It just says "no longer want", sometimes without even calling onDestroy(), as far as I can tell.
07-20 17:07:11.593 I/ActivityManager(85): No longer want my.project.datalogging (pid 23918): hidden #16
07-20 17:07:11.593 I/WindowManager(85): WIN DEATH: Window{44c61570 my.project.datalogging/my.project.datalogging.DataLoggingApp paused=false}
07-20 17:07:11.603 I/BackgroundService(23925): onDestroy()

Or later (after I manually restarted it):
07-20 19:00:49.677 I/ActivityManager(85): No longer want my.project.datalogging:BackgroundService (pid 24421): hidden #17
07-20 19:00:49.677 I/ActivityManager(85): No longer want my.project.datalogging (pid 24415): hidden #18
07-20 19:00:49.807 85 10707 I WindowManager: WIN DEATH: Window{44f1ea58 my.project.datalogging/my.project.datalogging.DataLoggingApp paused=false}

I often see other services being killed with "no longer want" and then immediately restarted with "Scheduling restart of crashed service". For example here with runkeeper:
07-20 17:30:45.503 I/ActivityManager(85): No longer want com.fitnesskeeper.runkeeper (pid 24090): hidden #16
07-20 17:30:45.603 W/ActivityManager(85): Scheduling restart of crashed service com.fitnesskeeper.runkeeper/.services.RunKeeperService in 5000ms
07-20 17:33:52.989 I/ActivityManager(85): Start proc com.fitnesskeeper.runkeeper for service com.fitnesskeeper.runkeeper/.services.RunKeeperService: pid=24292 uid=10099 gids={3003, 1015}

The logs show no record of low memory. Testing is done on (several) Nexus One with 2.2 (Froyo FRF91). Is there any way I can achieve this behaviour with my app? Automatic restarting after being killed? Or this this something totally different that just looks similar in logcat?

View 2 Replies View Related

Android : Is There A Way To Prevent Crashed Service From Restarting

Nov 12, 2009

Is there a way to prevent your service from restarting if it crashed?

View 7 Replies View Related

Android :: How Do I Do A StartActivity In BroadcastReceiver?

Apr 7, 2009

My use case is to launch one of settings app screen when I receive a certain event in idle state. For which, I added my new intent to PhoneAppBroadcastReceiver() in PhoneApp.java (looks like this receiver handles the misc intents) But when i call startActivity(), The phone seems to go into a panic ex. startActivity(new Intent(this, NetworkSetting.class)); My questions are is this the right approach to go about ? If so 1. How can I launch the activity inside of broadcastReceiver? secondly 2. How do i verify if the activity i want to start is already started?Can the NEW_TASK_LAUNCH be used to verify this ,

View 2 Replies View Related

Android :: BroadcastReceiver To Get Incoming SMS

Sep 21, 2010

I have written an application to read all incoming SMS and if the SMS contains certain string, I will also send a copy of the message to my another phone for backup purposes.

I used the reference from the following website:

http://www.anddev.org/novice-tutorials-f8/recognize-react-on-incoming...

It uses BroadcastReceiver to get the incoming SMS, but when I tried to send it using the following method:

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

It always crashes. Any idea how to resolve it? Is it because of using BroadcastReceiver.

View 4 Replies View Related

Android :: AppWidgetProvider And BroadcastReceiver

Oct 2, 2009

I have an app widget that extends an AppWidgetProvider to create an application widget.

I would like the application widget to be idle until an activity in my app runs; actually when a service in my app is started.

Once that service is started, I need to "wake up" the application widget and communicate with it (i.e. tell it things to display).

So I see that AppWidgetProvider simply extends BroadcastReceiver -- so does that mean:

1. I need to call registerReceiver in my service and tell it to filter for certain kinds of events?

2. Can I even do #1, or will an AppWidgetProvider *only* accept ACTION_APPWIDGET_* intents?

3. If #2 is correct, how can I communicate or "wake up" / trigger the application widget?

4. Can I send events to my app widget using sendBroadcast( intent )?

Then, my app widget has some buttons on it, I need to send an intent back to the application (or service). I see you can do that with PendingIntents, but if i send the different intents it to the same Activity, it seems to re-use the first created pending intent.

View 2 Replies View Related

Android :: App Contains BroadcastReceiver And Activity

Aug 6, 2009

I want to start a project which contains a BroadcastReceiver and an Activity. The BroadcastReceiver doesn't communicate with the activity. But they share a same resource. Can i do it in only one Project (that means, i use only 1 apk to install both BroadcastReceiver and the Activity on my phone), or i have to develope them seperately in 2 projects.

View 3 Replies View Related

Android :: BroadcastReceiver On Service

Aug 28, 2009

Can I Receive a Broadcast from a Service? It seem I have to extend BroadcastReceiver to receive broadcasts but I'm already extending Service and I can't extend 2 classes. Do I set up an additional Activity to receive broadcasts and then just pass stuff to the already running Service. And if so, how to I pass additional info to an existing Service? Is there a better way?

View 4 Replies View Related

Android :: BroadcastReceiver And AbortBroadcast

Jun 22, 2010

How can I best implement a BroadcastReceiver that may need to "consume" the current broadcast (via abortBroadcast()), but it first needs to perform some non-trivial work to determine whether or not the broadcast should be consumed.

The problem is that if the non-trivial work takes more than 10 seconds then the receiver is considered to be blocked by the system and may be killed.

I realise that long-running operations should not be performed in the onReceive() method of receivers for that very reason, and should instead be handed-off to an appropriate service. However, if the current broadcast is to be consumed, then the abortBroadcast() method must be called within the onReceive() method before it returns. If some processing is required to determine whether the current broadcast should be consumed or not, then things can get tricky.

I'm developing an app that can consume some (but not all) inbound SMS messages. For any given SMS message it will need to perform some analysis based on the sender's phone number and the message body (including database lookups) in order to determine if the message is one that is relevant to the app or not. In the vast majority of cases this will take less than 10 seconds, but it is possible that it could take longer on rare occasions.

To get around this I'm considering the following solution.

1. On receiving a broadcast for a received SMS, my receiver starts a background thread to perform the required analysis and handle the message if appropriate. 2. The main thread (currenly executing the onReceive() method) waits until either the background thread has finished its work, or 8 seconds have elapsed, whichever occurs first. 3. If the background thread finished within the allotted time (which should happen most of the time), then the main thread calls abortBroadcast() or not, (depending on the result of the analysis) and returns normally. 4. If the background thread did NOT finish within 8 seconds, then the main thread stops the background thread and instead starts a service to perform the work. In this case it does NOT call abortBroadcast(), and the broadcast will be passed to other receivers (eg the default messaging app) regardless of whether or not the service ends up handling the message. While not an ideal outcome, it is acceptable.

View 4 Replies View Related

Android :: BroadcastReceiver - Sms Received

Dec 29, 2009

I'd like my app to catch incoming SMS messages. There are a few examples of this around. Looks like we just need to do this:

code:..........

Is this correct? I'm sending my phone some sms messages, but the log statement never gets printed. I do have some other SMS applications installed on the phone, which display a popup when the sms is received - are they somehow blocking the intent from getting passed down to my app, they are just consuming it completely?

View 2 Replies View Related

Android :: Service And A BroadCastReceiver

Jun 2, 2010

I have seen several examples on how to implement a BroadCastReceiver, but how should I implement a Service who has to react on some pending Intent (for example incoming phone call)...Actually I was wondering about the same "prbolem" but in an Activity..You obviously have a class which extends a Service 9or an Activity) so it cannot also extend BroadCastReceiver...It looks like we cannot make "platform-awar" services and/or Activties ?

View 2 Replies View Related

Android :: Set BroadcastReceiver To Be Inactive

Jun 22, 2010

I have a BroadcastReceiver set up in my Android application that receives SMS receive events. This works fine, but I want to be able to toggle SMS receiving on and off by toggling the BroadcastReceiver on and off. Because if I have a simple boolean inside the onReceive method, even if the SMS receiving is off, my application will start.

View 1 Replies View Related

Android :: AlertDialog In BroadcastReceiver

Aug 8, 2010

I'm trying to create an application that can use the android as a fax machine, IE Send a picture as a fax or receive a fax and save as a picture. So far I'm starting from the ground up and making sure I can intercept a call at the users discretion. I have an Receiver registered in the Manifest of my program with a filter of Phone_State which flags when the state has changed(IE incoming call).

So on my BroadcastReceiver I'm trying to have an AlertDialog popup prompting the user to either accept as fax or call but the AlertDialog seems to throw a android.view.WindowManager$BadTokenException Error when it has an incoming call. My code is just simple an onReceive(context arg0, intent arg1) and I pass the arg0 to the AlertDialog...

The full error message is below

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

From what I have seen in the AlertDialog code, it passes the context as well as a Window and WindowManager, which I believe is why it's crashing, is there a better way or something else I should be using which might overlay the call screen?

View 2 Replies View Related

Android :: Can't Enable BroadcastReceiver

Jan 12, 2010

I got back to the widget development after upgrading to the latest SDK and all of the sudden my widget is failing on startup with this message:

ERROR/AndroidRuntime(5296): java.lang.RuntimeException:
Unable to start receiver topjob.widget.SearchWidget:
java.lang.SecurityException: Permission Denial:
attempt to change component state from pid=5296, uid=10057, package uid=10048

Here's two lines of code where exception occurs:..................

View 1 Replies View Related

Android :: BroadcastReceiver Crashing / Why Is So?

Feb 19, 2010

I have this Broadcast receiver registered code...

but when the line reaches context.startActivity(intentalarm);
the application crashes

may be it is where we pass first parameter to Intent, I'm not clear about.

View 1 Replies View Related

Android :: Application Crashed After Either Receive Phone Call

Oct 30, 2010

After I either receive a phone call or make one, (and other undocumented interruptions) my application gets a NullPointerException when resuming my activity. Can any explain to me where it is and/or how to fix it?now, pls help me to fix this problem, how do i handle phone call or SMS received or such kind of interruptions?

View 2 Replies View Related

Android :: BroadcastReceiver Communicating With Activity

Feb 26, 2009

Is it possible to update a currently running activity from a BroadcastReceiver? I want to update my activity from a BroadcastReceiver that runs alongside it. When I run my app (from Eclipse), my activity starts. When the BroadcastReceiver is triggered, it currently tries to start the activity (with extras in the bundle...this is the important part), but nothing happens, presumably because the activity is already running. So my question is, how do I get the new information to my Activity (or even just tell the activity that there's new information to get if I stick the information in a database)? This seems like it should be fairly straightforward, but I'm clearly missing something.

View 3 Replies View Related

Android :: BroadcastReceiver Stopped Execution

Oct 13, 2009

My application used to start when phone start by broadcast reciever. After that i used to execute some code after every 10 seconds. Using handler but after some time it used to stop execution. Can some one tell me what can be reason behind it ?

View 2 Replies View Related







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