Did u call super.onCreate before your call your context is null On Dec 2, 5:57 am, Mr Pinguin <pinguint...@googlemail.com> wrote: > While calling: > AudioManager aManager = (AudioManager) ct.getSystemService > (Context.AUDIO_SERVICE); > > i get this error : > > E/AndroidRuntime( 416): Uncaught handler: thread main exiting due to > uncaught exception > E/AndroidRuntime( 416): java.lang.RuntimeException: Unable to start > activity ComponentInfo{com.fmcc.callrecorder/ > com.fmcc.callrecorder.CallRecorder}: java.l > ang.NullPointerException > E/AndroidRuntime( 416): at > android.app.ActivityThread.performLaunchActivity(ActivityThread.java: > 2401) > E/AndroidRuntime( 416): at > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: > 2417) > E/AndroidRuntime( 416): at android.app.ActivityThread.access > $2100(ActivityThread.java:116) > E/AndroidRuntime( 416): at android.app.ActivityThread > $H.handleMessage(ActivityThread.java:1794) > E/AndroidRuntime( 416): at android.os.Handler.dispatchMessage > (Handler.java:99) > E/AndroidRuntime( 416): at android.os.Looper.loop(Looper.java: > 123) > E/AndroidRuntime( 416): at android.app.ActivityThread.main > (ActivityThread.java:4203) > E/AndroidRuntime( 416): at > java.lang.reflect.Method.invokeNative(Native Method) > E/AndroidRuntime( 416): at java.lang.reflect.Method.invoke > (Method.java:521) > E/AndroidRuntime( 416): at com.android.internal.os.ZygoteInit > $MethodAndArgsCaller.run(ZygoteInit.java:791) > E/AndroidRuntime( 416): at > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) > E/AndroidRuntime( 416): at dalvik.system.NativeStart.main > (Native Method) > E/AndroidRuntime( 416): Caused by: java.lang.NullPointerException > E/AndroidRuntime( 416): at > com.fmcc.callrecorder.CallRecorder.onCreate(CallRecorder.java:57) > E/AndroidRuntime( 416): at > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: > 1123) > E/AndroidRuntime( 416): at > android.app.ActivityThread.performLaunchActivity(ActivityThread.java: > 2364) > E/AndroidRuntime( 416): ... 11 more > > What have i doing wrong ?
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en