XLabs/Xamarin-Forms-Labs — pull request #398 by PenaPP (2014-10-16 21:23:16+00:00)
Title: Fixed AddAttachments extension method

Rewriten AddAttachments extension method so it does not throw an exception (pasted below) when passing List to intent.PutExtra...

10-16 23:20:17.596 W/Bundle (20747): Key android.intent.extra.STREAM expected Parcelable but value was a java.util.ArrayList. The default value was returned.
10-16 23:20:17.596 W/Bundle (20747): Attempt to cast generated internal exception:
10-16 23:20:17.596 W/Bundle (20747): java.lang.ClassCastException: java.util.ArrayList cannot be cast to android.os.Parcelable
10-16 23:20:17.596 W/Bundle (20747):	at android.os.Bundle.getParcelable(Bundle.java:1179)
10-16 23:20:17.596 W/Bundle (20747):	at android.content.Intent.getParcelableExtra(Intent.java:4330)
10-16 23:20:17.596 W/Bundle (20747):	at android.content.Intent.migrateExtraStreamToClipData(Intent.java:6855)
10-16 23:20:17.596 W/Bundle (20747):	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1411)
10-16 23:20:17.596 W/Bundle (20747):	at android.app.ContextImpl.startActivity(ContextImpl.java:957)
10-16 23:20:17.596 W/Bundle (20747):	at android.app.ContextImpl.startActivity(ContextImpl.java:939)
10-16 23:20:17.596 W/Bundle (20747):	at android.content.ContextWrapper.startActivity(ContextWrapper.java:284)
10-16 23:20:17.596 W/Bundle (20747):	at mono.java.lang.RunnableImplementor.n_run(Native Method)
10-16 23:20:17.596 W/Bundle (20747):	at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:29)
10-16 23:20:17.596 W/Bundle (20747):	at android.os.Handler.handleCallback(Handler.java:725)
10-16 23:20:17.596 W/Bundle (20747):	at android.os.Handler.dispatchMessage(Handler.java:92)
10-16 23:20:17.596 W/Bundle (20747):	at android.os.Looper.loop(Looper.java:137)
10-16 23:20:17.596 W/Bundle (20747):	at android.app.ActivityThread.main(ActivityThread.java:5041)
10-16 23:20:17.596 W/Bundle (20747):	at java.lang.reflect.Method.invokeNative(Native Method)
10-16 23:20:17.596 W/Bundle (20747):	at java.lang.reflect.Method.invoke(Method.java:511)
10-16 23:20:17.596 W/Bundle (20747):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
10-16 23:20:17.596 W/Bundle (20747):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
10-16 23:20:17.596 W/Bundle (20747):	at dalvik.system.NativeStart.main(Native Method)