Skip to content

Php modules created to work in a Drupal environment in order to support REST calls to an existent web-server

Notifications You must be signed in to change notification settings

biagiobotticelli/Drupal_Php_Modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GroupTracking WebApp PHP Modules

image

GroupTracking is an Android application that wants to allow to create group of friends obtained by Facebook and tracking their position outside building but also INSIDE! By using Beacons!

image

With GroupTracking you can create a group of friends, define a range in which your friends will be tracked and get their position directly on a map. Friends that are out of the range will NOT be tracked!

image

How does GroupTracking make tracking?

To tracking people, the GroupTracking Android app uses GPS and bluetooth of the smartphone. An Android Service searches for beacons through the bluetooth:

  • NO beacon is found: the app uses the last GPS coordinates to get the position;
  • A beacon is found: the app uses the coordinates of the nearest beacon to get the postion;

image

Why do we insert a Drupal WebApp in the system?

The Android application gets the data that it needs (such us beacon IDs, latitude and longitude, range, etc.) by REST calls made to an existent webserver. In order to communicate with the webserver, we develop the Drupal webapp with the following functions:

  • Get a list of Beacons;
  • Add a Beacon;
  • Delete an existent Beacon.

getBeacons.php

The first function is to get a list of the beacons that are available in the system.

The php module create a button "Get Beacons" and the page is empty:

image

when the button "Get Beacons" is clicked:

image

the module makes a GET request to the REST webserver to obtain the list of the available beacons of the system.

Once a response is obtained from the server, the informations of beacons are displayed in the page as a list of values.

image

addBeacon.php

This function allows the user to fill a form and insert a new beacon in the system:

image

The form has 5 fields that are requider:

  • Name: name to assign to the beacon;
  • Major: specific value of the single beacon;
  • Minor: specific value of the single beacon;
  • Latitude: latitude of the position of the beacon;
  • Longitude: longitude of the position of the beacon;

when the form is filled with correct values for the fields and the button "Add Beacon" is clicked:

image

the module makes a POST request to the REST webserver to insert the new beacon in the system (if it does NOT exist).

image

deleteBeacon.php & deleteBeaconRESTCall.php

The last two functions allow the user to select a beacon from the available ones and to delete it from the system.

To get an updated list of the beacons, the deleteBeacon.php module creates a button "Get Beacons":

image

when the button is clicked (as for the getBeacons.php):

image

the module makes a GET request to the REST webserver to obtain the list of the available beacons of the system.

Once a response is obtained from the server, the informations of beacons are displayed and a selection form is created.

image

The deleteBeaconRESTCall.php is not doing anything untill now... it's just waiting for a beaconID:

image

when the user makes it's selection in the form of deleteBeacon.php and press the button "Delete Beacon", the value of the selected beaconID is sent to the deleteBeaconRESTCall.php.

image

Now, deleteBeaconRESTCall.php module makes a REST call (POST) to delete the beacon from the server. If the beacon is successfully deleted from the system, a message will be displayed:

image

Additional Informations

The links to other GitHub sections of the GroupTracking project are:

You can find us on LinkedIn Profiles:

Presentation on SlideShare: http://www.slideshare.net/BiagioBotticelli/smart-team-tracking-project-group-tracking

The project was developed for the course of "Pervasive Systems 2016", held by Prof. Ioannis Chatzigiannakis within the Master of Science in Computer Science of University of Rome "La Sapienza".

Homepage of Pervasive Systems 2016 course : http://ichatz.me/index.php/Site/PervasiveSystems2016

Homepage of Prof. Ioannis Chatzigiannakis: http://ichatz.me/index.php

Homepage of MSECS "La Sapienza": http://cclii.dis.uniroma1.it/?q=msecs

About

Php modules created to work in a Drupal environment in order to support REST calls to an existent web-server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages