Skip to content

MrAmmia/FYP_Android

Repository files navigation

Intruder Detection System - Android Client

This is an Android application that connects to a Raspberry Pi 3 server with an intruder detection system. The app receives notifications when an intruder is detected, shows the intruder's image, and plays a 10-second clip of the intrusion. Additionally, the app supports live streaming from the detection system.

Features

  • Real-time Notifications: Receive alerts when the system detects an intruder.
  • Intruder Image & Video Clip: View an image of the intruder and a 10-second video clip capturing the event.
  • Live Streaming: Stream live footage directly from the intruder detection system.
  • Android Client: User-friendly interface to monitor and review intrusions.

Architecture Overview

The app communicates with a Raspberry Pi 3 server, which processes data from the detection system and sends notifications and media to the Android client.

Screnshots

S1 S2 S3

  • Server-side Python Code: The intruder detection system and server-side communication is implemented in Python. You can view the Python code here.

Tech Stack

  • Android Development: Kotlin
  • Server Communication: RESTful API
  • Media Handling: ExoPlayer for video playback
  • Notification: Firebase Cloud Messaging
  • Backend Server: Django backend hosted onRaspberry Pi 3
  • Intruder Detection: Implemented on the server-side using Python

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/MrAmmia/FYP_Android.git
    cd FYP_Android
    
  2. Set up the Intruder detection circuitry using the circuit schematic & diagram and Python code

  3. Set up the server by following the instructions in the Python server repository.

    • Clone the Django Server Repository
      git clone https://github.com/MrAmmia/FYP_Python.git
      cd FYP_Python
    • Create a Virtual Environment
      python -m venv env
      source env/bin/activate  # On Windows use `env\Scripts\activate`
    • Install Dependencies:Navigate to the project directory and install the required dependencies from requirements.txt
      pip install -r requirements.txt
      
    • Configure the Server Settings: In the settings.py file, configure your database and other necessary settings, such as the IP address of the Raspberry Pi. Ensure that the app can send notifications to the Android client using Firebase Cloud Messaging (FCM) or another push notification service
    • Run Migrations: Apply database migrations to set up the necessary tables:
      python manage.py migrate
      
    • Start the Server: Run the Django development server
      python manage.py runserver 0.0.0.0:8000
      
      
      
  4. Build the Android app in Android Studio or using Gradle:

    ./gradlew build
  5. Run the app on an Android device or emulator.

  6. Configure the app to connect to your Raspberry Pi server by updating the server URL in the configuration file.

How It Works

  • Intruder Detection: The Raspberry Pi server runs an intruder detection system that processes data from connected sensors and cameras.
  • Notification: When an intruder is detected, a notification is sent to the Android app with a snapshot and a short video clip.
  • Live Streaming: The app connects to the Raspberry Pi's camera feed and allows live monitoring of the premises.

Future Enhancements

  • Two-way audio communication to allow interaction with the intruder.
  • Integration with cloud storage for storing intrusion footage.
  • Enhanced AI for more accurate intrusion detection.

Project Report

You can find the detailed project report here

Contributing

Contributions are welcome! Please feel free to fork the repository, open issues, and submit pull requests.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages