Prevent android application from hanging up?
I am currently working on media player. When I am clicking the next button (for th开发者_JAVA技巧e next song) a number of times my application hangs up.
How do I handle this behavior and keep my app from handing up?
Write better code? And if you want help with your code you need to do as other have mentioned and show us the code that is responsible for the crash, use the adb logcat to see which line makes your code crash.
You will possibly be causing exceptions - so catching the exception should allow you to handle the error.
If you are struggling to re-create a crash you could use a reporting library to notify you of crashes your users suffer from for example ACRA
精彩评论