Monday, March 25, 2013

Re: [android-developers] Re: How to start again if some third party task killer has killed my app ?

You haven't found it, because it doesn't exist :-)

When the OS or a 3rd party app kills your process, it kills it forcefully. And if your app's process is killed your app no longer runs and obviously can't process any callbacks/lifecycle-events, etc. 

On Sunday, March 24, 2013 3:47:17 AM UTC-4, Piren wrote:
Actually you should take his suggestion, as it can also solve your issue.
Obviously something is wrong when the app is relaunched, you can use that "missing" information to understand you need to restart your app (i.e, if it crashes because the user login details are missing, just reset the app instead of crashing). When you see that condition, start your login screen with ClearTop flag (make sure the login screen is SingleInstance). 

BTW, there is not life cycle event i found that can help you understand an external program is force closing you.

On Friday, March 22, 2013 8:45:15 AM UTC+2, Amit Dwivedi wrote:
The question is not limited only about force close errors. It is more about the sudden death of the application which can happen because of so many reasons. In which I want to handle Force close when user goes to the Settings -> Applications -> my App and clicks "Force Close" and When some task killer App kills my App.

By no means I intended to handle Force Close errors generated by some errors / bugs, they must be faced and solved instead of hiding from them.


On Sat, Dec 29, 2012 at 9:43 PM, Nobu Games <dev.nob...@gmail.com> wrote:
I would focus on your force close error and fix that one instead of trying to work around other apps.


On Thursday, December 27, 2012 12:02:06 AM UTC-6, Amit Dwivedi wrote:

In my App I have several activities which are obviously related to each other. Whenever I am on some activity and the user kills my app by using any task killer. I want to do two things

  1. Clear the Notification which I added when the user logged in..
  2. finish all the activities other than the first Activity i.e. Login Activity

Now if user starts again my app either from the recent tasks or from launcher I want to start from the first activity i.e. Login Activity...

Presently my code works absolutely fine if I use android manage process and end the activity or force close the app from android task manager. But if I am using some other task killer app i.e. Advanced task killer, after closing the app when I relaunch the App from recent apps the it tries to restart from the last used Activity instead of Login Activty and gives an ugly force close error and when I click close it redirects me back to Login Activity... The Notification is also not cleared when in this case.

How do I handle third party task killers ?

I have read several threads on SO but couldn't get the pointers, few of them are ...

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-d...@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



--
Thanks & Regards,


Amit Kumar Dwivedi, 
Lead Programmer Analyst,
Argusoft India Ltd.

Cell No : +91-9714702392 (!dea), +91-9429551692 (BSNL) 

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment