Apologies if this has been solved in the forum before, but haven't been able to find a solution by searching.
My app uses HttpClient requests to access data on a web server. It also uses the AdMob library to display ads, a WebView activity, as well as push service receipt of messages using GCM.
All works well (B4A is great) but what I'm after is a way to reliably detect and trap any/all Java net errors without presenting an exception message to the user when the phone's data connection drops.
Using the PhoneEvents library, I've implemented a decent solution that monitors the state of the phone's data connection for presence of mobile network or Wifi. It checks prior to sending any HTTP requests to the web server for "net up". Not bad, eliminates a lot of issues.
However - there are still cases when the phone data connection can drop intermittently when network activity is onging and a java net exception message will appear.
Is there a way to trap the underlying Java exceptions in B4A (all of the time)?
My app uses HttpClient requests to access data on a web server. It also uses the AdMob library to display ads, a WebView activity, as well as push service receipt of messages using GCM.
All works well (B4A is great) but what I'm after is a way to reliably detect and trap any/all Java net errors without presenting an exception message to the user when the phone's data connection drops.
Using the PhoneEvents library, I've implemented a decent solution that monitors the state of the phone's data connection for presence of mobile network or Wifi. It checks prior to sending any HTTP requests to the web server for "net up". Not bad, eliminates a lot of issues.
However - there are still cases when the phone data connection can drop intermittently when network activity is onging and a java net exception message will appear.
Is there a way to trap the underlying Java exceptions in B4A (all of the time)?