$ show amitshekhariitbhu/Android-Debug-Database
Android Debug Database is an Android library that provides a web-based interface for debugging databases and shared preferences in Android applications. When included in an app's debug build, it starts a lightweight HTTP server that serves a web UI allowing developers to inspect databases, run SQL queries, edit data directly, and manage shared preferences. The architecture consists of a core library (debug-db-base) that handles server logic and database interactions, with optional modules for encrypted database support (debug-db-encrypt) and sample applications demonstrating usage. The system uses a client-server model where the server runs inside the Android app and the client is a standard web browser connecting via HTTP to localhost. Key features include support for SQLite databases, Room databases (including inMemory), SharedPreferences, and SQLCipher-encrypted databases, with a responsive web interface built using Bootstrap, jQuery, and DataTables.
The LLM identified 2 files worth highlighting for reuse:
Parses SQL queries to extract table names, handling various SQL dialects, comments, and edge cases like Oracle hints, CREATE INDEX statements, and DELETE without FROM clauses. Demonstrates non-obvious skill in SQL parsing with robust handling of complex SQL syntax. Could be extracted and used in any Java project needing SQL table name extraction with minimal modification.
Defines a common interface for SQLite database operations that allows the library to work with different SQLite implementations (standard SQLite, SQLCipher encrypted databases, and Room inMemory databases). Demonstrates the strategy pattern and interface segregation principle, enabling seamless switching between database implementations without changing client code. Highly reusable in any project needing to abstract SQLite operations.