3 Replies - 1082 Views - Last Post: 11 May 2012 - 02:33 AM

#1 Bocard   User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 223
  • Joined: 24-September 08

App crash

Posted 10 May 2012 - 05:33 AM

Hi guys,

I have a question and I didn't manage to find the answer online yet.

When an app crashes what exactly happens?
I did some testing myself and I expected the onDestroy() method to be called but apparently it is not. So, is there any method called?

Is there any way to make the app execute a small piece of code (close a connection for example) before it crashes?


Thx in advance.
Is This A Good Question/Topic? 0
  • +

Replies To: App crash

#2 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6535
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: App crash

Posted 10 May 2012 - 07:16 AM

No. Crash = Stopped dead in its tracks at whatever caused the crash. If you were able to then pick a method to run, it wouldn't be a crash.

You need to find the cause of the crash and handle it more gracefully.

Coding is easy - if you live in a perfect world and nothing ever goes wrong.

The rest of software creation is about error handling. LOTS of it. What happens if a hard drive dies mid-write... network drops mid transfer... user enters "five" instead of 5
Was This Post Helpful? 0
  • +
  • -

#3 H3R3T1C   User is offline

  • Android Expert
  • member icon

Reputation: 278
  • View blog
  • Posts: 757
  • Joined: 30-March 07

Re: App crash

Posted 10 May 2012 - 09:46 AM

If your app crashes you can view the crash details in LogCat!
Here is a link for debugging with eclipse: http://developer.and...g-projects.html
Was This Post Helpful? 0
  • +
  • -

#4 Bocard   User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 223
  • Joined: 24-September 08

Re: App crash

Posted 11 May 2012 - 02:33 AM

Thx guys, in the meantime I found these articles..maybe you will find them useful.

Article 1
Article 2
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1