views:

139

answers:

0

Hi!

I'm currently trying to catch a broadcast message with the MovieView class, already added the filter in the Manifest


//In MovieView private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Log.i(TAG,"--*Works? +-*+-"); String intentAction = intent.getAction(); Log.i(TAG,"BT died"); } }

};

but when I do my trial, I get this (very) huge exception:

E/AndroidRuntime( 2527): Uncaught handler: thread main exiting due to uncaught exception

E/AndroidRuntime( 2527): java.lang.RuntimeException: Unable to instantiate receiver com.android.camera.MovieView: java.lang.ClassCastException: com.android.camera.MovieView

E/AndroidRuntime( 2527): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2616)

E/AndroidRuntime( 2527): at android.app.ActivityThread.access$3100(ActivityThread.java:119)

E/AndroidRuntime( 2527): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)

E/AndroidRuntime( 2527): at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 2527): at android.os.Looper.loop(Looper.java:123)

E/AndroidRuntime( 2527): at android.app.ActivityThread.main(ActivityThread.java:4363)

E/AndroidRuntime( 2527): at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 2527): at java.lang.reflect.Method.invoke(Method.java:521)

E/AndroidRuntime( 2527): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)

E/AndroidRuntime( 2527): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

E/AndroidRuntime( 2527): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 2527): Caused by: java.lang.ClassCastException: com.android.camera.MovieView

E/AndroidRuntime( 2527): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2609)

Any hints on what might I be missing?

Thanks in advance!