Email Sign Up Now With MailChimp Support

Email Sign Up version 1.3 is now available on the Google Play store. This app allows you to collect email addresses using an Android tablet.

The latest version allows users to upload a file full of email addresses to a MailChimp list directly from the app. Of course, the MailChimp API Key and Unique List Id have to be set up via the settings screen for the feature to work.

Implementing MailChimp Integration

The integration was made possible thanks to the ChimpBot library. I just used the jar file provided on GitHub. I also made use of the Android AsyncTask to move the network traffic off of the user interface thread and update a progress bar.

Print Friendly

Track Your Chicken Expenses with Eggspense

Eggspense, my latest Android app, allows chicken keepers to track their chicken related expenses. The app helps someone with a flock of layers determine how much it costs to produce one dozen eggs. It does this by tracking chicken expenses and egg collections.

Chicken Expenses

All chicken expenses can be entered and logged by the app. See below for a screen shot.

expense history screen

Track all your chicken expenses.

Egg Collections

Collecting eggs is a daily chore and the app makes it easy to log how many eggs were collected each day.

egg history screen

Keep a log of the daily egg collection

Flock Statistics

Once the data is collected relevant statistics can be calculated. The app automatically recalculates the cost per dozen eggs every time the statistics screen is entered.

flock statistics screen

Let the app calculate how much it costs to produce a dozen eggs.

Colophon

This app uses an SQL Lite database. It also integrates with AChartEngine and ActionBarSherlock.

 

Google Play Logo

Eggspense On The Google Play Store

Print Friendly

How Grep Helped Tame RFC 6350

Screen shot of rfc6350 in an editor.

The vCard format is documented by 74 pages of plain text.

I have been researching the vCard file format for the purpose of adding it as an output format for my email collection app. As I mentioned previously, the file format is documented in RFC 6350. There is even a java library for reading and writing vCard files that was extracted from the Android source.

I was trying to think of a graphical way to represent RFC 6350. But how do you describe a wall of text? I came up with the screen shot on the left. If you want to see the gory details of a text based file format go ahead and take a look at RFC 6350 for yourself.

The Email Sign Up app only collects a person’s name and email address. Surely it doesn’t need to implement every possible field in the format. This leads to the question of what is the minimum number of fields for a valid vCard file? My first attempt to answer this question was to google it. The web pages I reviewed did not answer the question directly.

Of course I could integrate the existing java library for reading and writing vCards. However, this would have the drawback of creating an external dependency for my app. It would also increase the size of the app and use only a tiny fraction of the features provided by the library.

Towards A Minimal Implementation

The magic decoder ring for answering the question of what are the minimum number of fields in a vCard file comes from the RFC. See this excerpt:

    +-------------+--------------------------------------------------+
    | Cardinality | Meaning                                          |
    +-------------+--------------------------------------------------+
    |      1      | Exactly one instance per vCard MUST be present.  |
    |      *1     | Exactly one instance per vCard MAY be present.   |
    |      1*     | One or more instances per vCard MUST be present. |
    |      *      | One or more instances per vCard MAY be present.  |
    +-------------+--------------------------------------------------+

This is saying that all required fields have a Cardinality that begins with 1 and may have an asterisk after. Manually searching through 4147 lines of plain text to find out which fields match the pattern would be tedious and error prone.

Some have said that unix is the best text processing machine ever built. If you doubt the claim see this post for inspiration about what can be accomplished with six unix commands. Now I am no unix wizard but I do have some tricks up my sleeve.

How Many Fields Are Required In A vCard?

Here is how you can use grep in combination with wc to get the answer (four):

$ grep "Cardinality:  1" rfc6350.txt | wc -l
4

Now all that remains is to find what are the four fields that are required. Searching for the answer within a file is easy, once you know what to look for. Here is a minimal vCard that shows the four required fields.

BEGIN:VCARD
VERSION:3.0
FN:John Doe
END:VCARD

Conclusion

Analyzing the vCard format helped avoid integrating an entire library just to output a few lines of text.

And Also

Is this the funniest Dilbert ever written?

Print Friendly

vCard Links That Actually Explain the vCard Format

I have been researching the vCard format recently. I am planning to add this as an output format for the Email Sign Up app because the Android contact manager can import vCard files. This will allow users of Email Sign Up to import their collected email addresses directly into their device’s contact manager.

The vCard for Developers was one of the most helpful links.

These vCard notes were also helpful.

There is a Java library for reading and writing vCards that was extracted from the Android source code.

Finally, the actual RFC vCard file format specification.

Print Friendly

Email Sign Up Android Mailing List App

email symbol on blue background

Email Sign Up Icon

I have recently published my second Android application, Email Sign Up. It is a mailing list app that allows users to collect email addresses using their Android device while displaying a custom background image.

The app stores the collected email addresses to the SD card in a .csv file. The email addresses can then be added to a mailing list at a later time.

The intended use case is for live events such as trade shows. An Android tablet can be used to display a relevant image or photograph. Interested people can then enter their email address and have it added to a mailing list.

If you are so inclined, you can check out the listing on the Google Play store.

Google Play Logo

Email Sign Up On The Google Play Store

Print Friendly

Eco Trip Android Mileage Calculator

gas pump handle with line chart in the background

Eco Trip Icon

I have just published my first Android App, Eco Trip. The app calculates gas mileage, creates line charts of the mileage and shares the mile per gallon graph to social media sites.

I created the app to calculate my own gas mileage. I use the app every time I fill up. This app replaces the paper and pen mileage log that I have been keeping for years.

The app also follows the first rule of modern app development.

First Requirement of App Development

1) The application shall have the ability to share any images produced by the App to facebook.
This is so important that it can be done in about 4 lines of code:

Intent share = new Intent(Intent.ACTION_SEND);
share.setType("image/jpeg");

share.putExtra(Intent.EXTRA_STREAM,
  Uri.parse("file:///sdcard/DCIM/Camera/myPic.jpg"));

startActivity(Intent.createChooser(share, "Share Image"));

Why limit yourself to posting pictures of what you had for lunch or funny cats when you can share your fuel economy with the world?

If you are so inclined, you can get it on Google Play.

Google Play Logo

Eco Trip On The Google Play Store

Embedded Mile Per Gallon Graph Example

Here is an example of a graph embedded in a tweet.

 

 

Print Friendly