Ubuntu Nearby Scope 3 – Source code

Previous post: Ubuntu Nearby Scope 2

I uploaded the current source code to GitHub: https://github.com/weeman1337/ubuntu-scope-nearby

Some notes:

  • Please insert your Google Places API key into the config! The commited API key has been revoked and is not working!
  • Preview Widgets aren’t implemented yet
  • Settings aren’t be recognized yet
  • The distance is a dummy
  • Filters are not recognized
  • Departments are working
  • The location is currently fixed to my city
facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Ubuntu Nearby Scope 2

Previous post: Ubuntu Places Scope 1 – Planning

Similar Projects / Naming

This morning I read a blog post from David Planella about the Scope Showdown progress. There I found the information, that another Places Scope by Sam Segers is on the way. Because I believe that some variety is good I decided to continue my work on my Places Scope. The name of my Scope will be Nearby.

Nearby Scope overview


(1) Branding
Here I placed the name of the Scope. Also the Google Places API policy says that Google Places information without a map must be presented with a Google logo.

(2) Filter

This is the filter where the user can select the ordering of the results. The Google Places API defines two possibilities: Distance and prominence.

When adding the filters, it didn’t work at the beginning. So I asked for help in the Ubuntu development IRC channel. Luckily David Calle gave me the important hint to get the filters working:


This tells the system to display the filter, if possible.

(3) Departments

The Scopes API provides a hierarchically drill down function called Departments. This will be used by the Nearby Scope to give the user the option to drill down the search results by the Google Places types.

(4) The Scope card
As planned in the post before, the places’ information are displayed. The icons are currently taken from the Google Places search response. Because mobile users may want to save data I’ll add local images for the types later. Also I’ll provide a setting where the user can select to show an image (nicer but more traffic) or an icon (saves traffic).


I added some settings to the Scope. This is quite easy as described in the Scopes documentation.


(1) Radius
The user may enter a radius in the short distance unit (4) for the desired max distance of the search results.

(2) Default order (filter)
Here the user may select the default order of the search results: Distance or prominence.

(3) Long distance unit
The user can select one of the long distance units kilometers and miles.

(4) Short distance unit
The user can select one of the short distance units feets, meters and yards.

(5) Use location data
This setting was added by the system after inserting

LocationDataNeeded = true

into the ini file.


Ubuntu Nearby Scope 3 – Source code

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Ubuntu Places Scope 1 – Planning


So Canonical has kicked off another Ubuntu Showdown. This time it’s about Scopes for mobile users.

Since I like Ubuntu and want to support the upcoming Ubuntu Phone, I decided to take part in this showdown. After some days of thought I got an idea what may be interesting for mobile users:

Places Nearby Scope: Finding things around you

The Places Scope should help users to find things of their interest around them. For example if you’re hungy and want a pizza, you launch the Places Scope and search for “pizza”. ;)

To make the development easier for other’s I’ll share my development progress and lessons learned in this blog. Comments with suggestions and wishes are welcome!


The Ubuntu SDK installation was easy following the steps on the instrucitons pageIf you want to use the emulator upgrade to Ubuntu 14.10 before! Otherwise the SDK’s Devices section doesn’t work.

Before start of work I did the tutorials from this page, where you also find more documentation about Scope development. Because I want to use more functionalities of the Scopes I tried to get the filters working. After wasting some time with no progress I decided to look for help in the Ubuntu developer IRC channel. There a developer helped me out directly, what solved my issues.

Paces data source

At the beginning the Places Scope utilizes the Google Places API only to get the information. The Google Places API is easy to use and provides a lot of useful data.


The first goal is to provide the Scope cards list with the places fromm the Google Places API. To describe the UI I looked at the existing Scopes in an emulator device. I’ll explain my card UI plan using an eBay Scope screenshot.


(1) is an OptionSelectorFilter. In the Places Scope the user can select if the results are ordered by distance or relevance here.

(2) are departments. They are looking good be used as another “filter” for the place types (restaurant, car-wash, store…).

(3) is a Scope card. The places overview cards should look like this:




Ubuntu Nearby Scope 2

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather