When I run HttpDemo of 'Blackberry samples' on a 5.0 device, I get an exception:
net.rim.device.internal.io.CriticalIOException: Critical tunnel failure
But it works fine in the simulator. What are the possible reasons for this exception, and what are ways to overcome it?
Critical tunnel failure indicates that your device has not properly configured APN setting in Options>Advanced Option>TCP/IP. the APN is provided by your service provider. You also can use Wifi as an alternate. But if you want to use Direct TCP you have to provide APN.