Android version of our Iphone app ''Lunchappen''

Completed Posted Jul 26, 2012 Paid on delivery
Completed Paid on delivery

This is an app to get **restaurants in your vicinity**, and see their "today's special", so that you can drive to the restaurant that has the food you want to eat. In Sweden, most restaurants have a few specials to select from each day, served around noon ("lunch break").

The app is relatively simple: a lunch list with dishes and driving distances, a map with restaurants near you, a Favorites list you can add restaurants to, and an about screen. With a few detail views and map views, the total is **9 views**.

This is an established app, so we want the Android app to have the same quality of look and feel. Please have a look at how the Iphone app looks and works.

We expect you to **communicate well**! You report/send results: after ~3 days, the interface design, after ~7 days most of the functionality, and after 10 days a release candidate.

This app has **AdWhirl** ads, so you will need to have experience with this.

**GPS location logic** is important, so showing/explaining how good yours is gives you an advantage!

## Deliverables

NOTE: This spec also comes as PDF in the .zip file.

**The app "Lunchappen" design specifications**

**Very Important Guidelines**:

**1**. Don't use any fixed urls anywhere in the app - except one. This url is the address of an XML file containing whatever base directory on the web where you load all other files and images from.

**2**. Don't use fixed strings for any text that is displayed, we might need to correct Swedish characters like ???, or translate to other languages. **Use strings.xml. **

**3**. Use CacheBuster to prevent the phone caching files used by the app. (Append "&cacheBuster=12341234" to all URLs, where 12341234 is the integer timestamp when the file is loaded.)

**4**. XML is without exception in "Apple Plist 1.0" format. You must be able to parse this, and handle any character escaping necessary.

**5**. All text strings including those fetched from XML or HTTPResponses are UTF-8, no BOM. This includes strings in projects and sources. We are from Sweden, so here are the strange characters we use: ????? ?????. You **must** deliver all project sources in UTF-8! **We understand this is hard depending on your keyboard, so you may substitute a, o, u, etc.**

**6**. Please download and use the iPhone app from App Store to get a better sense of how the information is presented and navigated.

**7**. Text must be readable and buttons must be touchable (avoid tiny font sizes and button sizes)

**8**. Always show a spinner while something is loading.

**9**. Always hilight (blink) buttons and table cells when the user clicks on them.

**Design and screen formats:**

While it should follow the design closely, we understand that you have to adapt it to misc. screen formats. Sizing buttons and cells using dp is sometimes imperfect, if you have trouble with this, then use outer elements that adapt to the screen format, and use fill_parent for sub-elements.

**No ldpi or small screens need to be supported**. (See the table and piechart here [url removed, login to view] - this means that the whole first row and the whole first column can be unsupported.)

The app should support **API Level 7** (OS 2.1) and up; if this is a problem, persuade us to let you use API Level 10 as minimum.

It's important that text is readable and buttons are tappable, even at the smallest screen size above. You may put larger, invisible click-areas over a button to fix this.

**App usage / navigation:**

In the screenshots, you see the standard Iphone Tab Bar at the bottom. This switches between the 4 main parts of the app (see below). On Android, you would put this in the menu of the phone's physical Menu button instead. This means that you don't have to show the back buttons in the top left corner of subviews, and that the phone's physical back-button takes you back from subviews to previous subviews, all the way back to the 4 main views. In other words, normal functioning that Android users expect.

**1**. The user will see the loadingscreen and a spinner, while the data for the first **Lunch List View ([url removed, login to view])** is loaded. Then, the loading screen will fade out, showing the list of lunches ("today's specials") from restaurants near them. (If the user is planning a trip to another city, he taps V?lj Stad and selects a city in the City List View, and the lunch list is reloaded.) He scrolls the list and finds a yummy dish, taps it in the list, and this shows the **Detail View ([url removed, login to view])** with all the week's dishes, today's dish on top. He can now tap Karta in the top right corner to go to the **Single Map View (like [url removed, login to view] but only 1 restaurant)** and open a Google Maps route URL by tapping V?gbeskrivning.

This is the basic function, and it must work perfectly.

All lunch-data loaded comes already sorted and filtered as it should be, with all distances calculated for you in the data. So you only need to parse the XML data and put it in arrays.

**2**. The second main view, Karta, is a **Map View ([url removed, login to view])**, which is basically the same data as in the Lunch List View, but presented on a map instead. The button V?gbeskrivning opens a Google Maps route-URL in the default web browser ONLY if a pin is selected. This is because you must select a restaurant as your destination first.

**3**. The third main view, Favoriter, shows an empty Lunch List View and an alert saying that you haven't added any Favorites yet. There is a button to add to this list in the Detail View of each restaurant - the index (ID) of the restaurant is added to an array which is saved to the phone's SD card. You display the data as for the Lunch List View, but load it by giving the IDs as parameters in the load-URL, so that you only get the few restaurants that you have favorited. The Detail and Map views from this list work just like they do when you click a restaurant in the Lunch List view; all the views can be "cloned" and just the load-URL is changed.

You can remove restaurants from the Favorites, on the Iphone this is done the "special Iphone way", but it's quite all right to just have a delete-button in each tablecell to the left, which asks if you are sure, and if you click OK it's deleted.

**4**. The fourth main view, Om, is an About Us page, which is simply a picture, a text and a button in top left corner which opens a webpage in the default web browser.

**Map views and GPS coordinates:**

In the map views, clicking a pin shows a "speech bubble" containing restaurant name, distance, and opening hours. (In the second main view, Karta, also a button which pops up a pane showing today's special.)

**NOTE**: You must **always** make sure you have a recent and reasonably accurate (<250m or so) phone GPS coordinate before fetching new lunchdata! If a city has been selected, you must **never** call the GPS functions, until "Min Plats" takes you out of the city-mode! This is to save battery life.

Route source and destination:

The destination is always the selected restaurant.

If a city is selected, the source is the GPS-coordinate of the city, else the source is the phone's GPS coordinate.

**Indata:**

For graphical and other file resources, see the attached .zip file.

**All** .xml and .plist files are one(1) array of dictionarys in a standard Apple Plist 1.0 XML wrapper. Characters <, >, and & are HTML-escaped in these files and must be converted back.

**IMPORTANT:**

There is only **1** fixed url: **[url removed, login to view] - ** Your app cannot have **any** other fixed urls in it, or links may become broken in the future.

**[url removed, login to view] properties:**

xmldir - the base url for fetching all online files

aspurl - the base HTTPGet url for fetching online lunchdata - parameters must be added, see below.

homepage - the link for the button in the Om (About) view

**HTTPGet parameters to fetch lunchdata:**

Pseudocode for reading data looks like this: (string sAspURL is the base url above)

double srclat=57.123456; //city or phone latitude

double srclng=17.54321; //city or phone longitude

int reloadctr=0; //number of times the user has clicked "fetch 20 more..."

string sLunchURL=sAspURL + "?lat=" + [url removed, login to view]() + "&lng=" + [url removed, login to view]()

+ "&rld=" + [url removed, login to view]()

//HTTPGet using sLunchURL follows. You get data in UTF8 text format back.

**Favorite-mode****:**

When you are in the Favoriter view, you must add a 4th parameter:

string sFavorites="4232,23,567,112,3," //"ID" key for favorited restaurants, from your array

if (sFavorites!="") {sLunchURL=sLunchURL + "&fav=" + sFavorites;}

You store these ID numbers in an internal array that is saved to the app's local data storage in the phone every time the array is changed.

**Lunch data XML format:**

See the provided example [url removed, login to view] file. It is an array of dictionaries, where each dictionary is a restaurant, in each dictionary there are key-value pairs for this week's lunch dishes, contact info, and more:

ID - a unique ID number for the restaurant.

PrisVardag - Default meal price

PrisHelg - If not 0, this is the price shown for Saturday and Sunday meals.

NOTE: These 3 are integers. The rest are strings. This may be unimportant, depending on which XML parser you implement.

**IMPORTANT**: You are responsible for the correct conversion of the XML data to whatever data type you use for variables in the app! You must be able to handle empty or missing value tags! If the ID value tag is missing, empty or invalid, you must skip the restaurant! Do not count on the order of the tags!

Name - of the restaurant.

Adress - street address.

Postnr - zipcode, put between street address and city.

Postort - city.

Telefon - phone number

Epost - email address

Hemsida - homepage

LunchURL - link to the lunch page on the restaurant's home

Mandag,Tisdag,Onsdag,Torsdag,Fredag,Lordag,Sondag - dishes served at Monday, Tuesday...Sunday.

Oppettider - "opening hours", the time of day when lunch is served.

Ikon - for future use.

Latitude, Longitude - GPS position to the restaurant

Distance - in km. Display with 1 decimal, rounded up so f.ex. 1.34345687 km becomes "1.4 km". if < 1, multiply by 1000 and display as "340 m" instead of "0.4 km".

Abonnemang - a number 0..5 that control the display of the restaurant and the ad, see below.

MatrattUppdaterad - when the dish was last updated, in the format yyyy-MM-dd HH:mm:ss **NOTE**: if this date is older than 6 days, this restaurant must be skipped!

**Abonnemang control display of restaurant and ad!**

Paying restaurants are hilighted, show more text, and hide the ad. Also, the homepage button is hidden if Abonnemang is 0. Here is some code to control it:

int abb=[url removed, login to view](sAbonnemang); //put inside exception handler.

int showButton=0; //1=show

int showAd=1; //0=hide

int highlight=0; //1=white background

int lines=2; //maximum number of lines to display (set height of textbox accordingly.)

if (abb>0) {showButton=1;highlight=1;}

if (abb>=2) {showAd=0;}

if ( (abb==2)||(abb==4) ) {lines=4;}

if ( (abb==3)||(abb==5) ) {lines=6;}

**City List:**

The file [url removed, login to view] should be added as a resource in the app, and should not be downloaded. It's also in XML format and should be easy to parse.

**Fonts****:**

All headlines should be Trebuchet MS, and all else should be Helvetica. Use bold and italic as screenshots show.

**GPS coordinates for testing outside Sweden:**

Use lat=57.64387&lng=15.13323.

**What is what in the screenshots??**

This is added to match the XML values to what is displayed in the views.

**[url removed, login to view]:**

This is a launch picture, shown with a spinner on top, while the first HTTPGet fills the lunch list "behind" it. When it's done, this "cover picture" is faded out, leaving the lunch list.

**[url removed, login to view]:**

In the top left is a refresh button. This sets "reloadctr" to 0 (see above). At the bottom of the list (outside the picture), a button is appended that increases the reloadctr by 1. This works like in the list in the App Store app, "fetch 20 more...". We have done the button as simply an extra tablecell, with background color 0x6c2529 (rrggbb) and white textcolor, large Helvetica font.

V?lj Stad - opens the city list.

In this screenshot, there are no paying restaurants, therefore all cells are light gray, showing max. 2 lines of text. See ("Abonnemang" above.) The text is copied from the Monday to Sunday fields, depending on today's weekday. I.e. if it's Wednesday, the Onsdag text is used. The red headline is the Name field, and the small gray number to the right is the Distance field. Here you can see the formatting when the distance < 1 km mentioned above.

**[url removed, login to view]:**

Map version of the lunch list fetched, 1 pin for each restaurant. The "speech bubble" for the selected pin contains Name (Distance) as headline, and Oppettider as subtitle. The (i) button shows today's FULL food text as for the lunch list in a popup. [url removed, login to view] is used on the Iphone, but a nicely faded in toast or dialog with a dismiss-button is fine.

**[url removed, login to view]:**

First, restaurant-info: opening hours, meal price (see above), and street address+city.

Then, today's FULL food text. The title says "Idag <weekday>, vecka <weeknumber>". The weeknumber (1-52 or some years, 1-53) should be looked up properly, let me know if you want some code.

After this follows the rest of the weekdays, Monday to Sunday, and today's weekday is skipped. NOTE: if a day's food text is empty, you should display "Uppgift saknas.".

**[url removed, login to view]:**

This is exactly like the normal lunch list, but only lists the restaurants indexed in your Favorites file.

**DELIVERY:**

The final app must be delivered to AVIA in a form where it can be compiled with Eclipse and directly uploaded to Android market (with our keys). Any dependant libraries must be delivered with the Eclipse project. The "reverse domain identifier" for the app should be **[url removed, login to view]**.

Android Java Mobile App Development

Project ID: #2762877

About the project

3 proposals Remote project Active Aug 1, 2012

Awarded to:

sphinxsolution

See private message.

$850 USD in 14 days
(26 Reviews)
6.9

3 freelancers are bidding on average $850 for this job

TopOfStack

See private message.

$850 USD in 14 days
(185 Reviews)
7.8
itIndia2

See private message.

$850 USD in 14 days
(73 Reviews)
6.8