Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on Android - starting email activity seems to work though #12

Open
alixandru opened this issue Dec 22, 2016 · 0 comments
Open

Comments

@alixandru
Copy link

On Android I get this exception in the system logs, even though all paramters are correct. The email activity is started nevertheless, so this is not critical, but I think it should be taken care of anyway.

58:17.421  4014  4014 D ViewRootImpl: ViewPostImeInputStage processPointer 1
12-22 10:58:17.511  4014  4014 W Bundle  : Key android.intent.extra.TEXT expected ArrayList<CharSequence> but value was a android.text.SpannableStringBuilder.  The default value <null> was returned.
12-22 10:58:17.531  4014  4014 E art     : invalid stream - problem with parameter iterator in /data/app/ro.bvb.arenaxt.next-1/base.apk for method void com.tns.gen.android.view.View_OnClickListener.onClick(android.view.View)
12-22 10:58:17.551  4014  4014 W Bundle  : Attempt to cast generated internal exception:
12-22 10:58:17.551  4014  4014 W Bundle  : java.lang.ClassCastException: android.text.SpannableStringBuilder cannot be cast to java.util.ArrayList
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.os.BaseBundle.getCharSequenceArrayList(BaseBundle.java:1067)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.os.Bundle.getCharSequenceArrayList(Bundle.java:922)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.content.Intent.getCharSequenceArrayListExtra(Intent.java:6295)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.content.Intent.migrateExtraStreamToClipData(Intent.java:9179)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.content.Intent.migrateExtraStreamToClipData(Intent.java:9142)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.app.Instrumentation.execStartActivity(Instrumentation.java:1533)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.app.ContextImpl.startActivity(ContextImpl.java:739)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.app.ContextImpl.startActivity(ContextImpl.java:721)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.content.ContextWrapper.startActivity(ContextWrapper.java:345)
12-22 10:58:17.551  4014  4014 W Bundle  :      at com.tns.Runtime.callJSMethodNative(Native Method)
12-22 10:58:17.551  4014  4014 W Bundle  :      at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1022)
12-22 10:58:17.551  4014  4014 W Bundle  :      at com.tns.Runtime.callJSMethodImpl(Runtime.java:907)
12-22 10:58:17.551  4014  4014 W Bundle  :      at com.tns.Runtime.callJSMethod(Runtime.java:895)
12-22 10:58:17.551  4014  4014 W Bundle  :      at com.tns.Runtime.callJSMethod(Runtime.java:879)
12-22 10:58:17.551  4014  4014 W Bundle  :      at com.tns.Runtime.callJSMethod(Runtime.java:871)
12-22 10:58:17.551  4014  4014 W Bundle  :      at com.tns.gen.android.view.View_OnClickListener.onClick(android.view.View$OnClickListener.java)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.view.View.performClick(View.java:5702)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.widget.TextView.performClick(TextView.java:10888)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.view.View$PerformClick.run(View.java:22541)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.os.Handler.handleCallback(Handler.java:739)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.os.Handler.dispatchMessage(Handler.java:95)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.os.Looper.loop(Looper.java:158)
12-22 10:58:17.551  4014  4014 W Bundle  :      at android.app.ActivityThread.main(ActivityThread.java:7229)
12-22 10:58:17.551  4014  4014 W Bundle  :      at java.lang.reflect.Method.invoke(Native Method)
12-22 10:58:17.551  4014  4014 W Bundle  :      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
12-22 10:58:17.551  4014  4014 W Bundle  :      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

This is how I use the plugin:

    email.available().then((available) => {
        if (available) {
          email.compose({
            subject: "undisclosed",
            to: ['[email protected]'],
            cc: [],
            bcc: [],
            attachments: [],
            appPickerTitle: "Email",
            body: `
              <br><br><br>-------------------------------
              <br>OS: ${device.os} ${device.osVersion} ${device.language}
              <br>Device: ${device.manufacturer} ${device.model}
            `
          });
        } else {
          this.translate.get("feedback_not_ready").subscribe(txt => {
            toast.makeText(txt, toast.duration.long).show();
          });
        }
      }).catch(() => {
        this.translate.get("feedback_error").subscribe(txt => {
          toast.makeText(txt, toast.duration.long).show();
        });
      });

Note: I've tried with and without the empty cc/bcc/attachments parameters. Same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant