Android

If you made it here without visiting the original blog entry, then please read that here first. It will give you a better context with whats going on here since this is a continuation of that post.

Anyway, as stated in my blog I took what I had learned about Android development and decided that I would create a pretty neat app (although not near complete) to share in my Android brown bag presentation. When I was in Washington, D.C., I was at a restaurant eating dinner and suddenly I thought, “Wouldn’t it be cool if restaurants had more of a mobile presence? What would restaurants think of taking orders via a smartphone or tablet? You wouldn’t have to worry about pens, paper, paper machines, losing tickets, etc etc and plus as a bonus you would be the cool restaurant in town to go to. Your ordering would also be more efficient.

When deciding on what final app to create for my brown bag, I decided that I would make a restaurant app that would mimic this environment. The desired environment would be a handful of tablets that the waiters and waitresses would use to take orders at their tables and submit those orders via Wi-Fi connection to the wireless big screen in the back of the house with details of the orders for the cooks. Somewhere there would be a server with a database that would hold all the information about the day such as ticket numbers, their corresponding orders, the totals, the table numbers, the waiter/waitress that took the order, total sales for the day etc etc. Naturally, I don’t have this exact environment, so I had to improvise by creating and managing a sqlite databse on the Motorola Xoom tablet that would keep up with all of this information and interact with the app as needed. I didn’t have time to get all the functionality written to manage all the data that you might need but then again it was really supposed to be a demo and not fully featured in the first place.

I decided to name the restaurant “Pig In A Poke BBQ” since I love BBQ and wanted to go with that theme. I actually got the idea from the game show “Pig In A Poke” off of National Lampoons European Vacation. Don’t ask me why I thought of that so if you think I am weird I will understand but at least you get an insight to my kinda humor. 🙂 It’s not the best of the National Lampoon series but there are some funny parts in there.

AndroidDeloitte.007Anyhow, as you can see, here is another slide from my Keynote presentation (without animations of course) that shows the high level view of how the different components of the app communicate. Naturally, I followed the Model-View-Controller paradigm where the model is the sqlite database, you have two views and a controller that inserts and retrieves data as requested from these views. Once you have selected all the menu items you need, you tap on the “Submit Order” button and this information gets inserted into the database. When you navigate to the “Tickets” screen it goes and retrieves all the tickets and its order information and places it into a custom grid view. When navigating back to the Menu Screen it goes to the database and asks for all the menu items, their descriptions and their prices.

Remember, that in a real-world environment you can have specials on prices and new menus items added all the time. At some restaurants the prices are different after 4 PM where you have a separate lunch & dinner menu or on weekends some specialty restaurants have a weekend dessert. Below is a list of every view for each menu category for you to read and enjoy. 🙂 All screenshots are taken directly from a Motorola Xoom Tablet running Ice Cream Sandwich.

Apps&SoupsribsribsburgersSides

dessertsWhen you are done selecting your order, as noted earlier there is a simple message that the order has been submitting with no errors (certain errors can be placed here if it occurs). You will see that selecting an item changes the title of the button to “Remove From Order”.

SubmissionNow that you have placed that order (and probably others), tapping on the “My Orders” button will take you to the ticket screen as shown below. After the data comes back from the sqlite database, I place the tickets in a list view for easy selection and populate the custom grid view that I wrote, with the ticket data. Below are some tickets that have already been created.

Ticket1Ticket4There’s lots of things to improve about this app but I seriously just ran out of time but I am happy about what I got working in the time that I did. Obviously the ticket screen needs to be more eye appealing, needs to have tickets and servers separated for search or printouts. The main menu of items needs to have options to take away condiments for things like burgers, a place to check off if you want it ‘walking’ or burnt to a crisp and a place to order multiples of the same item. As it is now, you can just select one item for one order at a time or remove it from the order. The buttons, when selecting a menu, also need to be highlighted when active (a very easy fix) as well. These are some of the things that I wish I could have finished.

The main screen with the menu items, consists of a linear layout on the left and a linear layout of relative layouts on the right with custom borders around each linear layout item. The font I used is ‘Marker Felt’, which comes as part of the Mac font library and it worked perfectly with the BBQ theme along with the maroon color that I chose. Also, as you probably noticed, I used icons like ‘chili peppers’ for hot foods, a ‘heart’ for healthy foods and a ‘piggie’ for all you can eat items just to give the app a little more life.

I ended up writing the app 100% in Java instead of using xml layouts. I had started to look at the XML way and talked to a co-worker about it and he said, with my time limit, it might be faster to write it in Java if I wasn’t familiar with writing Android apps the XML way. I am kinda glad I did it this way anyway since I needed to keep my Java knowledge fresh in my mind and I think it allowed me to dive deeper into the Android SDK writing everything programmatically than if I would have gone the other route (but that’s just an assumption).

I really do think that there is a great opportunity for capturing some work writing apps for restaurants. All over the world now, restaurants are starting to pilot and implement different forms of digital goodness – everything from wireless ordering to dynamic digital menus. I might need to spruce this app up, port it to the iPhone (and iPad) and see how much interest that I can get. 🙂 what do you think?

If you have any more questions then let me know!

Oh yeah… are you hungry???? 🙂

Leave a comment