联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Java编程Java编程

日期:2019-03-09 10:49

Android Application

Sometimes you're out and about and are looking for somewhere to grab a

bite to eat. Perhaps you have a sensitive stomach, so, before you head out,

you want to know what the Food Standards Agency’s Food Hygiene ratings

are for restaurants. You may have seen these before as ‘Scores on the

Doors’ before you go into a restaurant:

Your task is to design and build an Android application that will allow a user

to find eatery hygiene information using the FSA’s API.

Searching

The application should include powerful search functionality. Users should

have a number of ways of finding the information that they need. Users

should be able to search using text input or by using their current location as

a starting point.

Users should also be able to refine their search criteria. Options for

refinement will include:

Filter by type of business

Filter by rating

Filter by region and local authority.

Set the radius of their search in miles. (Hint - read the API endpoint documentation

carefully, this is not complicated!)

Note that your application does not need to consider Scotland, which uses a

different scheme for ratings.

For all kinds of searches, you should consider the user experience of

searching so that it is obvious to the user when searches are occurring or

have been completed.

Presenting

Once a search has been conducted, the app should be able to present the

information that has been received. Users should be able to sort and filter

their results, by, for instance, distance (if a location search was conducted),

hygiene rating, date of last inspection etc. Users should be able to select an

individual establishment and see more details, including, for example, the

type of business, its full address. There may be other information that you

can populate this establishment view with.

There are some 'exempt' businesses that are included but not rated. You can

decide how to handle these in your app – say how you have done so in your

project report.

Storage

In addition to being able to retrieve and present data, your application should

also be able to store data. Users should be able to store ‘favourite’

establishments by adding it to their favourites both directly from search

results and from individual establishment views. Currently favourited

locations should be marked as such in search results and establishment

views.

There should be some central way of viewing and editing favourites.

Favourites should be stored persistently so that if the app is shut down and

re-opened, the favourites are still present. The approach you use is up to

you. The important thing is that the information is stored persistently, and not

lost when the app is closed.You should note your approach to persistent

storage in your project report.

The FSA API

The FSA’s API is open to the internet – it does not require any API keys or

other login information. The API is documented here:

http://api.ratings.food.gov.uk/helpLinks to an external site.

You will need to use v2 of the API. Note that you will need to set a request

header for this: x-api-version must be set to 2.

You will also need to make sure you set the type of response MIME for the

API responses. You should use the JSON feed. Your application should be

consistent in its usage.

Note that the API is open and that some of the requests that you can make

are extremely liberal. It is easily possible to make a request that will return

many megabytes of data. This will be slow to transfer and slow to process.

It is important that you carefully constrain your queries, for example by

specifying pageSize or pageNumber with requests where relevant. Requests

can also be appropriately constrained by making very specific requests (e.g.,

for a particular business ID).

Summary of features

To summarise, your app will contain the following main features:

Support querying of food hygiene ratings from the FSA API with a number

parameters

Support for displaying the results of searches

Support for ‘favouriting’ establishments


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp