I've been playing around with a simple IMAP client for Android using the Sun javamail API. After overcoming java.awt.datatransfer dependency limitations of the activation.jar (as described by http://davanum.wordpress.com/2007/12/22/android-send-email-via-gmail-actually-via-smtp/) , I discovered that I can only derive an InputStream from a MimeMessage contents. Strangely, nearly identical code works correctly as a normal java application.
After a deep dive into the javamail.jar and activation.jar source code, I discovered the problem. The android application cannot find the META-INF/mailcap file that exists in javamail.jar. I've traced the problem as far as the call to ClassLoader.getResources("META-INF/ mailcap") in SecuritySupport.getResources() of activation.jar. Unfortunately, the Android SDK does not provide the source for ClassLoader and I cannot inspect the operation. I can only see that it returns an empty enumeration. While the above case may be limited in scope (although I imagine Android users will want an IMAP client), it may be endemic of a larger problem. Namely, Does the Android SDK import files included in the META-INF directories of imported jar files? Thanks, -Will -- William Enck Department of Computer Science and Engineering The Pennsylvania State University [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---