开发者

Network availability to make a call

开发者 https://www.devze.com 2023-01-19 08:05 出处:网络
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

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 :(


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号