/SQLITE-Editor

Android application for SQLITE database management

Primary LanguageJava

SQLITE Editor

Rabab El Amerany Project



SqliteEditor is an Android application for SQLITE database management. Our goal is to create an application that will help users within a company; the goal is to provide them with an interface allowing basic manipulation of databases. The main functions of this application are: the creation of objects (databases, tables, lines), the deletion of objects (lines, tables) in addition to an authentication layer allowing to distinguish between two types of users (Administrator and normal user).

How the app works

Our application is based on internal databases allowing the storage of users, and tables created. The start interface includes a connection form allowing each user authentication to access the view dedicated to him. There are two types of view depending on the type of user: "Administrator" or "User".

The "Administrator" view allows the management and search of users with an account on the application, while the "User" view allows through an interface the creation of databases, tables, the execution of SQL queries and the database export.

Built With

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Pre-requisites

The application currently requires JDK to build. If you already have JDK installed, skip this step.

Check if the right JDK is already available

Run the command java -version. If you have the JDK installed, you should see something like:

openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)

If this command shows a different version is not a problem, you can follow the instructions below to install the JDK.

Install the JDK

We recommend using jEnv to manage your JDK installations. Here are instructions to setup a working JDK 1.8 installation :

  1. Setup up Homebrew.

  2. Install jEnv using Homebrew.

brew install jenv
  1. Add the following lines to your shell configuration file (~/.bash_profile if you're using bash, or ~/.zshrc if you're using zsh).
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"
  1. Once this is done, you'll need to restart the terminal or reload the configuration file in order for the jenv command to be recognised.
source <path to shell configuration file>
  1. Install the JDK using Homebrew.
brew tap AdoptOpenJDK/openjdk
brew install adoptopenjdk11
  1. Add the installed JDK to jEnv or another version
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
  1. Run the command jenv versions. You should see something like:
  system
  11
* 11.0
  11.0.10
  openjdk64-11.0.10

Clone the project using git.

Run the following command in a terminal.

$ git clone https://github.com/rabelamerany/SQLITE-Editor

Install Android Studio

Download and install Android Studio from their website.

Import the project into Android Studio.

When Android Studio starts up, it will prompt you to create a new project or import an existing project. Select the option to import an existing project, navigate to the SQLITE-Editor directory you cloned earlier, and select it.

When building for the first time, gradle will download all dependencies so it'll take a few minutes to complete. Subsequent builds will be faster.

(back to top)

Running locally

The Simple App can be run locally on an Android emulator using Android Studio. To do this,

Create a Run/Debug configuration

  • Open the Run/Debug configurations window through Run -> Edit Configurations (ref)
  • Create a new configuration using the Android App template
  • Set the module to app, and finish creating the configuration

Create a virtual device

  • Create an Android Virtual Device (AVD) using the AVD Manager, usually found in Tools -> AVD Manager. (ref)
  • Select a device and operating system
  • Note: You will have to download one of the available OS options the first time you create an AVD

Set the right build variant

  • Open the Build Variants window through View -> Tool Windows -> Build Variants, or clicking the item in the lower left corner of the main window
  • Set the Build Variant of the app module to qaDebug

Run the app

  • Click "Run", either through Run -> Run, or the green play button in the top toolbar.

(back to top)

Contact

Rabab El Amerany - rab.el.amerany@gmail.com

Project Link: https://github.com/rabelamerany/SQLITE-Editor

(back to top)