Does someone know how to simulate service crash in emulator ? I have two services running in my application on Emulator, and I have to check what happens if a Service crashes..
Thanks in Advance
Does someone know how to simulate service crash in emulator ? I have two services running in my application on Emulator, and I have to check what happens if a Service crashes..
Thanks in Advance
If you want to make the service crash, all you need to do is to make it throw unhandled exception.
If you write:
int a = 3/0
it will throw an exception, and the service will crash
You can also stop service in Settings-Application-Running and choose your App/Service. This is not exactly crash, but stopping service during some work can cause also some troubles ;-)