AsyncTask Issue On 4.0

CodeMonkeyCodeMonkey Adrian EstranGBMember ✭✭✭
edited October 2012 in Android

Hi all

I have been developing my app on a device running Android 2.3 and decided to test it on my One X running 4.0

Everything appears to work as normal but I am getting an exception within my Intent receiver used to receive Push notifications.

Error 1: java.lang.RuntimeException: Handler (android.webkit.WebView$PrivateHandler) {40d73f50} sending message to a Handler on a dead thread

I have read that this error is common and should be resolved by placing the following line in Application.OnCreate():

Class.forName("android.os.AsyncTask");

But I can't seem to replicate this call in Mono? Does anyone know the equivalent (or another fix)?

Regards Adrian

Posts

  • CodeMonkeyCodeMonkey Adrian Estran GBMember ✭✭✭

    Think I solved this, slow start..

    Java.Lang.Class.ForName("com.company.appName.SampleBroadcastReceiver");

  • CodeMonkeyCodeMonkey Adrian Estran GBMember ✭✭✭

    Just noticed another error which again is not causing the app to stop working, but seems to be 4.0 specific:

    All WebView methods must be called on the UI thread. Future versions of WebView may not support use on other threads.

Sign In or Register to comment.