projects/positioning/backend/src/main/java/io/v/positioning/BluetoothProximityServlet.java
/**
     * Processes a GET request for the nearby bluetooth records
     *
     * @param req  The servlet request that includes <b>"androidId"</b> parameter
     * @param resp The servlet response with the number of nearby devices
     */
Processes a GET request for the nearby bluetooth records
@param req  The servlet request that includes "androidId" parameter
@param resp The servlet response with the number of nearby devices
Processes a GET request for the nearby bluetooth records @param req The servlet request that includes " androidId " parameter @param resp The servlet response with the number of nearby devices
@Override
    public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
        resp.setContentType("text/plain");
        DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
        Query.Filter propertyFilter = new Query.FilterPredicate("androidId", Query.FilterOperator.EQUAL, req.getParameter("androidId"));
        Query q = new Query("bluetooth").setFilter(propertyFilter);
        List<Entity> list = datastore.prepare(q).asList(FetchOptions.Builder.withDefaults());
        resp.getWriter().println("Number of nearby devices: " + list.size());
    }
@ Override public void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException { resp . setContentType ( "text/plain" ) ; DatastoreService datastore = DatastoreServiceFactory . getDatastoreService ( ) ; Query . Filter propertyFilter = new Query . FilterPredicate ( "androidId" , Query . FilterOperator . EQUAL , req . getParameter ( "androidId" ) ) ; Query q = new Query ( "bluetooth" ) . setFilter ( propertyFilter ) ; List < Entity > list = datastore . prepare ( q ) . asList ( FetchOptions . Builder . withDefaults ( ) ) ; resp . getWriter ( ) . println ( "Number of nearby devices: " + list . size ( ) ) ; }
Processes a GET request for the nearby bluetooth records
 @param req  The servlet request that includes <b>"androidId"</b> parameter
 @param resp The servlet response with the number of nearby devices
Processes a GET request for the nearby bluetooth records @param req The servlet request that includes <b > " androidId " < / b > parameter @param resp The servlet response with the number of nearby devices
// for now, send the count.