Friday, January 10, 2014

Usbong: Sign-in and Register Error Fixed!

Hi everyone,
Here's the latest update on Usbong.
Just this morning, I received news that a number of people
are having trouble registering and signing into Usbong. 

The mobile app was throwing an error, saying:
"android.os.NetworkOnMainThreadException"

This error basically means that the app 
is doing a network operation, such as HTTP requests, 
in its main UI thread, which earlier Android versions allowed, 
but Ice Cream Sandwich (ICS) and Honeycomb do not.

This was brought about by the fact that we specifically included 
SDK version 18 (Android 4.3) as the target SDK version,
while maintaining that the app runs on 
at least SDK version 8 (Android 2.2).

To cut a long story short, the error has now been fixed.
We simply created a new thread whenever we perform HTTP requests.

If you're interested in reading 
a more detailed explanation,
please refer to: androiddesignpatterns
 

Special thanks to stackoverflow 
for helping us arrive at a solution.
We used a combination of this
 and this
.
  
For those who downloaded Usbong via Google Play,
the updated .apk, you should be available 
within a few hours after receiving this email.
Take note that the version should: Jan. 9, 2014.

As for the source code, please check Google Code.

If you run into some more errors, 
feel free to get in touch with us via: 

Cheers,
Mike