K-9 Mail for Android

5,127 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,127
On SlideShare
0
From Embeds
0
Number of Embeds
510
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

K-9 Mail for Android

  1. 1. K-9 Mail for Android Jesse Vincent jesse@fsck.com
  2. 2. Hi!
  3. 3. I'm Jesse
  4. 4. I'm a Perl Hacker
  5. 5. Also, I like to break things
  6. 6. What is “K-9”?
  7. 7. What is “K-9”?
  8. 8. Email client
  9. 9. For Android
  10. 10. Why “K-9”?
  11. 11. My favorite mail client
  12. 12. mutt
  13. 13. K-9
  14. 14. + =
  15. 15. Didn't it come with a mail client?
  16. 16. No Search
  17. 17. No “stars”
  18. 18. No Self-Signed Certificate Support
  19. 19. No BCC-Self
  20. 20. No IMAP IDLE
  21. 21. No multi-select
  22. 22. No keybindings
  23. 23. No IMAP Deletes
  24. 24. I almost returned my new phone
  25. 25. It's Open Source
  26. 26. I could fix it
  27. 27. “How hard could it be?”
  28. 28. It's all Java
  29. 29. ..the last time I used Java...
  30. 30. I used Mosaic
  31. 31. Applets were new
  32. 32. Internet Explorer 1.0 was brand new
  33. 33. Java is supposed to be “easy” for newbies
  34. 34. How hard could it be?
  35. 35. So I got the code
  36. 36. git clone git://android.git.kernel.org/platform/packages/apps/Email.git
  37. 37. Only one change REALLY mattered
  38. 38. Delete from IMAP Servers
  39. 39. --- a/src/com/android/email/MessagingController.java +++ b/src/com/android/email/MessagingController.java h @@ -455,13 +458,28 @@ public class MessagingController implements Runnable { for (Message message : remoteMessages) { Message localMessage = localUidMap.get(message.getUid()); if (localMessage == null || (!localMessage.isSet(Flag.X_DOWNLOADED_FULL) && + !localMessage.isSet(Flag.DELETED) && !localMessage.isSet(Flag.X_DOWNLOADED_PARTIAL))) { unsyncedMessages.add(message); } } } + for (Message message : localMessages) { + Message remoteMessage = remoteUidMap.get(message.getUid()); + // skip things deleted on the server side + if (remoteMessage != null && message.isSet(Flag.DELETED)) { + remoteMessage.setFlag(Flag.DELETED, true); + } + }
  40. 40. 8 loc
  41. 41. I'm done!
  42. 42. Building K-9 (First time)
  43. 43. No Makefile
  44. 44. It's Java
  45. 45. No build.xml
  46. 46. “Just build the whole OS”
  47. 47. No
  48. 48. 10 Hours
  49. 49. Worked great in emulator
  50. 50. ...but not on a real phone
  51. 51. For “security”
  52. 52. What now?
  53. 53. Submit the change to Android?
  54. 54. I tried
  55. 55. They hadn't yet figured out the whole community thing
  56. 56. (It's gotten better)
  57. 57. I like to share
  58. 58. How to share?
  59. 59. Fork!
  60. 60. Fork the OS?!?!
  61. 61. What did it take to fork?
  62. 62. Google Code Project
  63. 63. What's next?
  64. 64. Android Developer Account
  65. 65. Pay $20 to become an Android Market Publisher
  66. 66. Submit a web form
  67. 67. Wait <10s
  68. 68. Profit!
  69. 69. Oh, wait
  70. 70. (It's free)
  71. 71. Jesse, [...] Please inform Motorola tech of this as they have recommended your program but disavow any knowledge of how to fix it, as you are 3rd party. They did though, suggest I contact godaddy, and they did give me your email, so they weren't completely useless. ALSO, IT WOULD BE HELPFUL IF YOU SOMEHOW HAD A PHONE NUMBER ON YOUR SITE, and an easier way to contact your tech people. M. A.
  72. 72. Writing end-user software is... different
  73. 73. What did Google think?
  74. 74. Some:
  75. 75. But why couldn't you submit patches?
  76. 76. Most:
  77. 77. Awesome...
  78. 78. ...So, there's this feature I want...
  79. 79. K-9 Today
  80. 80. I have co- conspirators!
  81. 81. Authors (by commit count) ● 505 jessev ● 256 danapple0 ● 143 baolongnt ● 45 cketti ● 31 ismarc31 ● 17 young.bradley ● 16 brock.tice ● 5 dumbfile ● 4 tibbetts ● 2 sparrowhawk ● 1 yostinso++
  82. 82. They write features
  83. 83. They fix bugs
  84. 84. They help users
  85. 85. They make K-9 awesome
  86. 86. Over 150,000 Downloads
  87. 87. 1500 “Bug” Reports
  88. 88. App Ecosystem
  89. 89. K-9 Mail Locale Plugin
  90. 90. K-9 Data Killer
  91. 91. Email Popup
  92. 92. K-9 features
  93. 93. Updated UI
  94. 94. IMAP Push
  95. 95. Configurable polling
  96. 96. Multi-folder sync
  97. 97. “Stars”
  98. 98. Multi-select
  99. 99. Message Previews
  100. 100. BCC-Self
  101. 101. Signatures
  102. 102. Multiple Identities
  103. 103. CRAM-MD5 Auth
  104. 104. Self-Signed SSL Certificates
  105. 105. Keyboard shortcuts
  106. 106. Full-text search
  107. 107. Lots more!
  108. 108. Getting started hacking on K-9
  109. 109. Get the SDK
  110. 110. (It's free)
  111. 111. Linux, OSX or Windows
  112. 112. http://developer.android.com/sdk
  113. 113. Create an “AVD”
  114. 114. android create avd --name Fone --target android- 7
  115. 115. Start the emulator
  116. 116. emulator -avd Fone
  117. 117. Checking out the code
  118. 118. svn co http://k9mail.googlecode.com/svn/k9mail/trunk/ k9
  119. 119. Create a local.properties file
  120. 120. sdk.dir=/home/jesse/android-sdk-linux
  121. 121. Building K-9
  122. 122. ant debug
  123. 123. Getting K-9 to your device
  124. 124. adb install bin/K9-debug.apk
  125. 125. Send patches!
  126. 126. googlecode.com/k9mail
  127. 127. Time to get hacking!
  128. 128. Come hack on K9 at Frog Cafe tomorrow!
  129. 129. Thanks!
  130. 130. Questions? Jesse Vincent jesse@fsck.com

×