Filtering by geolocation

2 posts, 0 answers
  1. Dobromir
    Dobromir avatar
    1 posts
    Member since:
    May 2014

    Posted 11 Oct 2014 Link to this post

    Hello everyone,
    what I need is that function over there in Javascript SDK for filtering near geo point. 

    var query = new Everlive.Query();
    query.where().nearSphere('Location', [23.379068, 42.650601], 100, 'km');

    Is this functionality available in Android SDK?
    Thank you
  2. Anton Dobrev
    Anton Dobrev avatar
    529 posts

    Posted 14 Oct 2014 Link to this post

    Hello Dobromir,

    The Android SDK currently does not expose querying on GeoPoint fields out of the box. In order to achieve this you need to send a header with the filter to the REST API of  Backend Services as explained here, by appending it as an "X-Everlive-Filter" header to the request.

    For example:
    public ArrayList<Book> GetBooks(EverliveApp app) {
        RequestResult<ArrayList<Book>> requestResult = app.workWith().
                    getAll().beforeRequest(new GenericCallbackAction<Request>() {
                public void invoke(Request request) {
                    request.getHeaders().put("X-Everlive-Filter", "Stringified filter value here");
        return requestResult.getSuccess() ? requestResult.getValue() : null;

    Let me know if this works for you and if you have questions.

    Anton Dobrev
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
Back to Top