Click here to Skip to main content
12,949,083 members (62,679 online)
Click here to Skip to main content
Add your own
alternative version


22 bookmarked
Posted 30 May 2013

Loggy Project

, 31 May 2013 CPOL
Rate this:
Please Sign up or sign in to vote.
Store your life, every day!


Loggy is an open source project that allows to record your life. It uses the microphone and the photocamera of your smartphone as essential hardware to capture the frames and the audio streams. Another important component of this project is the mindwave headset. Through this device we retrieve our attention level. With this information we can select to record an image or video multimedia files.


Mindwave... what is it?

Mindwave is an innovative headset produced by Neurosky. Mindwave converts brainwaves into digital electronic signals. There are two version of this device:   

Mindwave... two versions, but which i should choose?

For the scope of this project the Mindwave Mobile is indispensable. That device supports the bluetooth connection, through the bluetooth connection it send the data in RAW mode to the connected devices. With the retrieved data we can parse the various frequency reading by the headset. 

What do I need to implement this project?

The fundamental elements to create this project are:

  1. Android Smartphone with front camera
  2. Windows Seven or 8
  3. Mindwave Headset
  4. Loggy.apk
  5. FileZilla Server
  6. Photo Gallery

Complex architecture but modular

Loggy is divided in two logical modules:

  • Capture the multimedia files: the multimedia files are stored and processed by the Android device. These files are saved as images and videos directly into external sdcard memory. In this way we prevent the wear of internal memory.
  • Face tagging and photo organizing: all of multimedia files are saved through a FTP communication betwwen the Android device and the Windows server. In this mode we daily unload the Android device. Once downloaded the files, we must use the software named "Photo Gallery" to catalog them.

Capture the multimedia file: 

All the multimedia files are captured, processed and saved temporarily on the Android device external memory. Using this method we optimize and simplify the management of the files. The main event that allows the capture of files is the attention level provided by the headset. When the attention level is included between 25% and 60% it captures a frame. Instead the attention level is above 60% it records a video. Each video is 10 seconds long. Below the logical diagram and its corresponding source code:  

    if((msg.arg1 > 25)&&(msg.arg1<60) && (!pictureTaken) &&(!recording)){
        camera.takePicture(null, null, jpegCallback);
        pictureTaken = true;
    }else if(msg.arg1<50){
        pictureTaken = false;
    if(msg.arg1 > 60){
                recording= true;
            }catch (IOException e) {
            // TODO: handle exception

Class Initialization

The business logic of Loggy uses two fundamental class of Android's framework to capture the multimedia file contents.

  • Camera class: this class is used to setup the image capture, start/stop the preview, capture the frame and to obtain each single frame to encoding and recording  the videos. For a correct use of the Camera class, follow this step in order:
    1. Obtain an instance of the class through the its a static methods open();
    2. Retrieve the default settings with setParameters()
    3. if necessary, modify the returned Camera.Parameters object and call set Parameters(Camera.Parameters)
    4. Set the surface holder to see the preview 
    5. Start the preview using startPreview() method

    After that, we can take pictures using the takePicture() method.

  • MediaRecorder class: the MediaRecorder class is used to record audio and video streams. It needs of an instance of Camera class. Below the steps to create a correct MediaRecorder object:
    1. Create an instance of MediaRecorder class
    2. Set the audio source
    3. Set the output format
    4. Set the audio encoding  
    5. Set the path where the software saves the video files
    6. Invoke the prepare() method to initialize the MediaRecorder with the previous settings
    7. Start recording by start() method

    Finally, call the stop, reset, and release methods to release the MediaRecorder resources to another process.

Face tagging and photo organizer:

Wrote the code, we must create the architecture to send the multimedia files to the server. The communication protocol used is the FTP (File Transfer Protocol).

Smartphone's Configuration:

This step is so simple. We must only download and install AndFTP app form the PlayStore.

FTP Server Configuration:

Do you know FileZilla Server? If your answer is "No", FileZilla server is a software that allow to create a FTP server. With it you can manage the users, the home path and the relative permissions. Follow this stemp to setup the environment:

  1. Download the FileZilla Server bin package  from here:
  2. Install it
  3. After that, run server(the icon is on your desktop)
  4. Create one user with his relative HOME_PATH- This path will contain all of multimedia files captured by the Android phone
  5. Test the connection using the AndFTP Android's app.

Photo Gallery:

Now we can catalog our transferred multimedia files using Windows Photo Gallery. Open Photo Gallery and click on the top-left blue button: 

Then add the folder that contains the multimedia files of Loggy:

After that select only the Loggy's folder an the left list and click on "Batch people tag" to tag all faces:

Search person:

Now we have a catalog of person. With the Search function of Photo Gallery we can known when we have meet a person for example,or if is possible we can known where we have meet it! 

Image Captured:

Below several image captured by Loggy!

  • Me using Loggy: 

  • Me using Loggy(2): 

  • Me driving my car: 

  • My Parrot 

  • My Iguana:  


With Loggy you can store your life and tag your friend on Facebook. I use this project for more day and i have store more GigaByte of data! For more information see my website( 


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Antonio Blescia
Software Developer (Senior) Futura Enterprise Srl
Italy Italy
Software developer with great passion for innovative technology. Open source application writer for disabilities person.(

You may also be interested in...

Comments and Discussions

QuestionThat's pretty neat Pin
Sacha Barber16-Oct-13 23:12
mvpSacha Barber16-Oct-13 23:12 
AnswerRe: That's pretty neat Pin
Antonio Blescia16-Oct-13 23:16
memberAntonio Blescia16-Oct-13 23:16 
GeneralMy vote of 5 Pin
Mihai MOGA13-Jun-13 20:50
memberMihai MOGA13-Jun-13 20:50 
Questioninteresting Pin
CIDev7-Jun-13 10:37
memberCIDev7-Jun-13 10:37 
AnswerRe: interesting Pin
Antonio Blescia11-Jun-13 22:49
memberAntonio Blescia11-Jun-13 22:49 
Questionwhy loggy is so funny Pin
Member 99673343-Jun-13 14:36
memberMember 99673343-Jun-13 14:36 
AnswerRe: why loggy is so funny Pin
Antonio Blescia3-Jun-13 20:50
memberAntonio Blescia3-Jun-13 20:50 
GeneralMy vote of 5 Pin
Cornelius Henning1-Jun-13 2:07
memberCornelius Henning1-Jun-13 2:07 
GeneralMy vote of 5 Pin
Ranjan.D31-May-13 5:03
professionalRanjan.D31-May-13 5:03 
GeneralRe: My vote of 5 Pin
Antonio Blescia31-May-13 5:08
memberAntonio Blescia31-May-13 5:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170524.1 | Last Updated 31 May 2013
Article Copyright 2013 by Antonio Blescia
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid