The updated application had been tested successfully on a Galaxy Tab running 4.2, a Motorola DroidX running 2.2 and numerous emulators running 4.2 or 2.2. Therefore I updated the minSdkVersion to 8 and the targetSdkVersion to 17, then tested again on the same devices and emulators.
An end-user with a Nexus 7 running 4.2 immediately encountered an Internet connectivity problem. Further testing determined the following:
- Setting the targetSdkVersion back to 8 fixed the problem on the Nexus 7
- The root source of the problem is the app makes web service calls on the main thread, which was allowable under Android 1.6 (4) when the app was originally developed. This policy changed somewhere between SDK 8 and 17. The key error message in the stack trace was: android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
No comments:
Post a Comment