Skip to content

armgit / haven

Public Imported from GitHub
0

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors

Added license and readme

mziccarda61f402eb7f4
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..7caa47f
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,14 @@
+Copyright (c) 2014 Marco Ziccardi
+
+
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1cc7717
--- /dev/null
+++ b/README.md
@@ -0,0 +1,58 @@
+# SecureIt
+Sample Android application that serves as a monitoring service by leveraging on device sensors. Among sensors exploited we report:
+
+- *Accelerometer*: used to detect phone's motion
+
+- *Camera*: used to detect motion in the phone's surroundings
+
+- *Microphone*: used to detected noises in the enviroment
+
+The source code is released open source to be used as a reference (possibly wrong) for your own code. The aim is to help fill in the gap between Javadoc documentation and real code samples.
+
+# Building
+
+The application can be built using Android Studio. Building has been tested with Android Studio 1.1.
+
+# Usage
+
+## Main view
+
+Application's main view allows the user to set which sensors to use and the corresponding level of sensitivity. A security code must be provided, needed to disable monitoring. A phone number can be set, if any of the sensors is triggered a message is sent to the specified number.
+Once monitoring is started a paged view gains focus with one fragment for each sensor. Each of these fragments gives a graphical representation of the corresponding sensor state.
+
+## Accelerometer Fragment
+
+The accelerometer page shows an OpenGL animation providing a graphic representation of phone's orientation. Fragment class is defined in `me.ziccard.securit.fragment.AccelerometerFragment`.
+
+## Camera Fragment
+
+The camera page containes three sub-views:
+
+- a SurfaceView provides real-time camera-captured images
+
+- an ImageView shows the last image considered by the motion detector
+
+- an other ImageView shows the current image being considred by the motion detector
+
+GUI classes are defined in `me.ziccard.securit.fragment.CameraFragment`
+and `me.ziccard.securit.Preview`.
+Motion detection is performed via an asynchronous task defined in `me.ziccard.secureit.async` that leverages on classes in `me.ziccard.secureit.motiondetection`.
+
+## Microphone Fragment
+
+The microphone page provides a two-bar histogram of sound levels being captured by the mic and is defined in class `MicrophoneFragment`
+Mic data is captured via an asynchronous task (`me.ziccard.secureit.async.MicSamplerTask`) and the class
+`me.ziccard.secureit.codec.AudioCodec`.
+
+# Notifications
+
+When one of the sensors is triggered (reaches the sensibility threshold) a notifications is sent through the following channels (if enabled).
+
+- Wifi or Mobile Data: HTTP requests are sent to a server, including periodic updates of device location. Code can be found in package `me.ziccard.secureit.upload`
+
+- Bluetooth: messages are sent to all listening nearby devices. Code can be found in packages `me.ziccard.secureit.{bluetooth, messages}`
+
+- SMS: a message is sent to the number specified when monitoring started
+
+Notifications are sent through a service running in background that is defined in class `me.ziccard.secureit.serviceUploadService`.
+