Building a GPS Path Recording Android App with Amap Android SDK and Totem Database

2023-05-6

project lapse time: 2023-4-11 - 2023-5-21


Introduction

In the realm of computer science, databases play a pivotal role in storing, managing, and retrieving data. As part of my undergraduate Database course, I had the privilege of leading a team to develop an Android application that records GPS paths. The project was not just an academic exercise but a practical application of database management systems, Android development, and API integration. We utilized the Amap Android SDK for GPS functionalities and based our backend on the Totem database developed by Wuhan University (WHU). This blog post aims to elucidate the project's objectives, challenges, and accomplishments.

Project Overview

Objectives

  1. To improve and optimize the existing Totem database (tmdb) by fixing bugs and enhancing performance.
  2. To develop an Android application that records real-time GPS paths using the Amap API.

Technologies Used

  • Programming Language: Java (Android), SQL (Database)
  • Database: Totem Database (tmdb)
  • API: Amap API for GPS functionalities
  • Development Environment: Android Studio, tmdb Server
tmdb Page

tmdb system tables

Development Phases

Phase 1: Research and Planning

We started by conducting a thorough analysis of the existing tmdb and identifying areas for improvement. Simultaneously, we studied the Amap API documentation to understand how to integrate it into our Android app.

Phase 2: Database Optimization

Our team worked on enhancing the tmdb by fixing known bugs and optimizing its performance. This phase was crucial for the seamless operation of our Android app.

Phase 3: Android App Development

We developed the Android app using Java in Android Studio. The app had the following features:

  • Real-time GPS tracking
  • Trajectory plotting
  • Data storage in tmdb
  • Phase 4: Testing and Deployment
  • The final phase involved rigorous testing of the app and the database. After ensuring that all functionalities were working as expected, we deployed the app.
tmdb Page
tmdb Page

online&offline traces

Challenges and Solutions

  1. Data Integrity: Ensuring that the GPS data is accurately stored and retrieved from tmdb was a challenge. We implemented rigorous validation checks to overcome this.

  2. Real-time Performance: The app needed to record and display GPS data in real-time. We optimized our SQL queries and used efficient data structures to achieve this.

  3. Team Coordination: As the team leader, it was imperative to keep everyone on the same page. We used agile methodologies and regular stand-ups to ensure smooth progress.

tmdb Page
tmdb Page

the trajectory join function

Conclusion

The project was a resounding success, meeting all its objectives. We not only improved and optimized tmdb but also successfully developed an Android app capable of real-time GPS path recording. This project served as an invaluable learning experience, offering a practical perspective on database management systems, Android development, and API integration.

Our project is open source and available on GitHub.