android: problem sending mail, SuperNotCalledException thrown

Posted by MobileDev123 on Stack Overflow See other posts from Stack Overflow or by MobileDev123
Published on 2010-12-29T10:09:25Z Indexed on 2010/12/29 10:54 UTC
Read the original article Hit count: 282

Filed under:
|

Hi,

While sending mail from a button's click my device shows an error. Which throws SuperNotCalledException in logcat

I am posting the code and the logcat output here.

Code

Intent emailIntent = new Intent(
      android.content.Intent.ACTION_SEND);
    emailIntent.setType("text/plain");
    String recosubject = getString(R.string.recoSub);
    emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, ""
      + recosubject);

    emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, ""
      + reco);

    startActivity(Intent.createChooser(intent, "Send mail..."));

And here is the logcat output

Uncaught handler: thread main exiting due to uncaught exception
12-29 15:29:14.488: ERROR/AndroidRuntime(6823): android.app.SuperNotCalledException: Activity {android/com.android.internal.app.ChooserActivity} did not call through to super.onCreate()
12-29 15:29:14.488: ERROR/AndroidRuntime(6823):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2461)
12-29 15:29:14.488: ERROR/AndroidRuntime(6823):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
12-29 15:29:14.488: ERROR/AndroidRuntime(6823):     at android.app.ActivityThread.access$2200(ActivityThread.java:119)
12-29 15:29:14.488: ERROR/AndroidRuntime(6823):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
12-29 15:29:14.488: ERROR/AndroidRuntime(6823):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-29 15:29:14.488: ERROR/AndroidRuntime(6823):     at android.os.Looper.loop(Looper.java:123)
12-29 15:29:14.488: ERROR/AndroidRuntime(6823):     at android.app.ActivityThread.main(ActivityThread.java:4367)
12-29 15:29:14.488: ERROR/AndroidRuntime(6823):     at java.lang.reflect.Method.invokeNative(Native Method)
12-29 15:29:14.488: ERROR/AndroidRuntime(6823):     at java.lang.reflect.Method.invoke(Method.java:521)
12-29 15:29:14.488: ERROR/AndroidRuntime(6823):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
12-29 15:29:14.488: ERROR/AndroidRuntime(6823):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
12-29 15:29:14.488: ERROR/AndroidRuntime(6823):     at dalvik.system.NativeStart.main(Native Method)

Can anybody tell what is going wrong in this code?

© Stack Overflow or respective owner

Related posts about android

Related posts about email