kentaylor / AvocadoAC

Inspired by Chris Smith's project this application does classification differently, logs classifications in a local database and maintains an online repository of activities.
https://github.com/kentaylor/ContextApi/wiki/Classification-Update
5 stars 5 forks source link

Force Close on Startup with no Internet Connection. #27

Closed umranium closed 13 years ago

umranium commented 13 years ago

The service force closes on startup when there is no internet connection.

There are several of these errors, without any pop-up: Unable to get service state java.lang.NullPointerException: println needs a message at android.util.Log.println_native(Native Method) at android.util.Log.i(Log.java:143) at activity.classifier.RecorderService.updateButton(RecorderService.java:745) at activity.classifier.RecorderService$10.run(RecorderService.java:683) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:144) at android.app.ActivityThread.main(ActivityThread.java:4937) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) at dalvik.system.NativeStart.main(Native Method)

Then finally this, with a popup: Unable to upload sensor logs java.net.UnknownHostException: testingjungoo.appspot.com at java.net.InetAddress.lookupHostByName(InetAddress.java:513) at java.net.InetAddress.getAllByNameImpl(InetAddress.java:278) at java.net.InetAddress.getAllByName(InetAddress.java:242) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136) at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164) at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465) at activity.classifier.RecorderService$11.run(RecorderService.java:548) at java.util.Timer$TimerImpl.run(Timer.java:289)

The error says: "The application Activity Classifier (process activity.classifier) has stopped unexpectedly. Please try again."

kentaylor commented 13 years ago

Fixed