views:

23

answers:

1

In my application I have written code to make a call to helpline just by clicking on button. When I copy this application to my Android device, if the network is not available it exits the application. I want to display a error message rather than exiting.

One more issue,I have written code to add a helpline number to contactbook when the application is loaded into device. When i check it on emulator it works, but on device it's not working :(

A: 

Use logcat to see why your application is exiting.
For example if its due to an error or uncaught exception, detect it (make sure an object isn't null before calling its methods) or catch and handle the exception.

Chris Stratton