THIS SDK ISDEPRECATED.

We rolled out a new and better SDK for you.

Opening hours

Represents information that states when a POI will be open during the next 7 days, starting with the current day in the local time of the POI. It returns a list of strings that represent the opening and closing hours in a given Response format.

Sample use case 1: You are searching for a specific store to visit but you don`t know if it is currently open. Through your app you query the opening shop times and the store working hours are displayed on the screen.

Sample use case 2: A company is collating a report about the closing hours in a given city area for grocery shops. Using the SDK services, all grocery shops in a given radius can be queried for closing hours, allowing statistical analysis and other studies.

The opening hours data are available in the Search API.

Have a look at the detailed documentation for more information related to the Points of Interest Search and Fuzzy Search

That parameter will be used for services where POIs are exposed, including:

  • Category Search
  • Along Route Search
  • Geometry Search
  • Fuzzy Search

Include "withOpeningHours" in the query builder as shown in the following code snippet:

1TimeDescriptor timeDescriptor = new TimeDescriptor(OpeningHoursMode.NEXT_SEVEN_DAYS)
2
3FuzzySearchEngineDescriptor fuzzySearchEngineDescriptor = new FuzzySearchEngineDescriptor.Builder()
4 .language("en-GB")
5 .build();
6
7FuzzyLocationDescriptor fuzzyLocationDescriptor = new FuzzyLocationDescriptor.Builder()
8 .positionBias(new LatLngBias(Locations.AMSTERDAM_LOCATION))
9 .build();
10
11FuzzySearchSpecification openingHoursSpecification = new FuzzySearchSpecification.Builder("Petrol station")
12 .searchEngineDescriptor(fuzzySearchEngineDescriptor)
13 .locationDescriptor(fuzzyLocationDescriptor)
14 .timeDescriptor(timeDescriptor)
15 .build();
16searchAPI.search(openingHoursSpecification, fuzzyOutcomeCallback);
1val timeDescriptor = TimeDescriptor(OpeningHoursMode.NEXT_SEVEN_DAYS)
2
3val searchEngineDescriptor = FuzzySearchEngineDescriptor.Builder()
4 .language("en-GB")
5 .build()
6
7val locationDescriptorBuilder = FuzzyLocationDescriptor.Builder()
8 .positionBias(LatLngBias(Locations.AMSTERDAM))
9 .build()
10
11val openingHoursQuery = FuzzySearchSpecification.Builder("Petrol station")
12 .searchEngineDescriptor(searchEngineDescriptor)
13 .locationDescriptor(locationDescriptorBuilder)
14 .timeDescriptor(timeDescriptor)
15 .build()

Screenshots:

image

Opening hours activated