Skip to content

Android App Documentation

Saagar Arya edited this page Dec 7, 2021 · 50 revisions

We created our android application in React Native. The application builds using gradle and js. Instructions on how to run the application on an android emulator are below.

  1. Start the android emulator from Android Studio via the AVD Manager
  2. Navigate to LibrarySystem-Android/LibrarySystem/
  3. run npm install in terminal or cmd (with admin privileges)
  4. run npx react-native run-android in terminal or cmd (with admin privileges)

If step 4 does not work, you can build the application and run the metro server using npm start and then drag app-debug.apk from /LibrarySystem-Android into the running emulator, and the application will start.

Not Logged In

Homepage


Homepage when user is not logged in
Upon opening the app, a user is greeted with this page, which shows the operating hours of the library, as well as three buttons. "See Items" directs them to the page with the catalog of items, "See Rooms" does the same for the rooms, and "Login" takes the user to the login page. Even if they are not logged in, the user is still able to view browse the items the library has to offer, as well as the rooms available for event rentals.
To access all the features available to them, the user can press the three horizontal lines in the top-left corner and a navigation menu will appear.

Navigation Menu

Navigation Bar

To navigate the application, the user can tap on the option of their choice on the navigation menu. If a user is not logged in, they will have the option to navigate to the Homepage, to the Browse Items page, to the Brose Rooms page, or to the login page, as seen in the image above.

Browse Items


Catalogue of Item with a Searchbar

The user can scroll through the catalogue or type in the search bar shown at the top of the image and press the "search" button (the magnifying glass) to the left of the search bar if they are looking for a particular item. Items can be searched by title or other relevant information. Information for each item, such as the item's title, description, and the image is provided for the user. As they are not logged in the user is only able to browse the item catalogue and nothing more.

Browse Rooms

Browse Rooms

The user can browse the rentable rooms in the library and see their capacity. As with Browse Items, the user can search for a specific room by typing the desired room name in the search bar at the top of the page and pressing the "search" button on its left.

Logged In As Patron

Sign up

Log in page Sign up page
Log in screen Sign up screen for Patron
A patron can navigate to the log in screen by either pressing the log in button on the homepage or in the nav bar. They are able to sign in if they already have an account using their username and password. They are also able to create an account by clicking on "Don't have an account? Sign up here!". The sign up page ask the patron to input their first and last name, username, password, email and address, and an optional button to indicate whether they are a resident of Montreal. Once the patron clicks submit, an account is created and the patron is directed to the log in page to log in.

Navigation Menu

Navigation menu for patron

Once the patron is logged in, they are able to view all the pages they have access to.

Items Page

Items Page Reserve an Item Reserved Successfully
View Items Reserve Items Item Reserved Successfully
Similar to the items page for users not logged in, the logged in patron is able to view all the items, search a specific item, and reserve the item at the next available date. When the patron clicks the reserve button, they are brought to a new page which displays the item and shows when the reservation will start. The reservation can be placed by clicking the submit button on the bottom right. A pop up message will appear to inform the patron that the reservation is made and direct the patron back to the Browse Items page.

Item Reservations

Item Reservations Renew Item Reservation Cancel Item Reservation
Item Reservations of Patron Renew Item Reservations Cancel Item Reservations
The patron is able to see all of their reservations by navigating to the Item Reservation page. They are able to renew the item (extend the item reservation for 2 more weeks) and cancel the item reservation.

Rooms

Browse Rooms Create Room Booking Pick Date Error message Booking Created
Rooms Create room booking Pick Date Error Message Booking Created

The patron is able to view and search all rooms as shown in the not logged in documentation. In addition to that, they are able to make a room booking by clicking on the reserve button below the room of their choosing. The app directs the patron to a different screen on which the patron can choose the date, start time and end time of the booking. If all the inputs are valid, the room booking will be created and the patron is directed to the View Room bookings page. Otherwise, an error message will appear indicating the specific error, such as the start time is before the library opens.

Room Bookings

View Room Bookings Cancel Room Booking
Log in screen Cancel Room Booking

On the View Room booking page, the patron is able to see all their room bookings with the room number, date, day of the week, and start and end time. They are able to cancel their room bookings by clicking on the cancel button on the room booking card of their choosing. Once they press cancel, a message pop ups informing them that the room booking is cancelled, and the screen automatically refreshes to reflect the change.

Settings

Settings

The user can access the Settings page from the Navigation Menu once they log in, regardless of whether they are logged in as a patron or librarian. In this page, they can see their current account details (first name, last name, address, email) and change these details. Once the user is done, they can press “save changes” to save their updated account details. This screen also allows the user to change their password. To do so, the user first needs to enter their current password, followed by their new password. Then they can press “change password” to update their password. If the password they entered for their current password is correct, and if the new password is valid, the password will be updated.

Log out

Log out

The patron can log out of their account by opening the nav bar and clicking on Log out.

Logged In As Librarian

Log In

Log In page

For a librarian to login, they can click on the "login" button on the homepage and they will be directed to the login screen shown above. By entering their username and password and clicking on "LOGIN" they will be logged in. An example librarian, whose username and password are shown in the image, has been added to the database under the name "Jeff". Note that since the head-librarian does not have any additional features available to them in the android application, their usage is identical to that of a regular librarian.

Navigation Menu

Navigation Menu for Librarian

To access the navigation menu, a librarian user presses on the three horizontal lines on the top-left corner of their screen. The menu shown in the image above will appear. In addition to the pages available to patrons, librarians can view a list of all librarians, a list of everyone's shifts, and create an account for a patron.

View Librarians

View Librarians

The user can scroll through a list of all librarians added to the system and view their name, email, and address displayed on individual cards. As well, there is a button (titled "View Their Shifts") to view an individual librarian's shifts at the bottom of each card. At the top of the page, the "View All Shifts" button directs the user to the "View All Shifts" page.

View Individual Shifts

Kevin's shifts

Upon pressing the "View Their Shifts" button for a certain librarian, a dialogue box pops up displaying a list of the librarian's shifts as shown in the image above for Kevin's shifts.

View All Shifts

View all shifts

A librarian can navigate to this page by either pressing "View All Shifts" in the navigation menu or the button with the same title in the View Librarians page. They are presented with a list of all the scheduled shifts. The first name of users is used as the identifier, with the exception of the head-librarian, who shows up as "admin" for their shifts.

View All Patrons

View All Patrons Verify Patron Delete Patron Successful Delete Patron Failed
View all patrons Verify Patron Delete Patron Successful Delete Patron Failed

On the "View all Patrons" screen, the librarian is able to see all Patron accounts in the Library System. They can also search for a specific patron. In addition, librarians are able to verify a patron, as well as delete their account by pressing the verify and delete buttons under each patron, respectively. Once a patron is deleted or verified, a message pops up saying whether the action was carried out successfully or if there was an error and the page is updated to show the change. A patron with an existing item reservation or room booking cannot be deleted.

Create In-Person Patron Account

Sign Up In-Person Patron Account Patron Signed Up Successfully
Sign Up For Patron Sign Up For Patron Successful

A librarian can go to the "Sign Up For Patron" screen from the navigation menu to sign up an in-person patron account for a patron who goes to the libarary in-person to make an account with the library. Once the account is made, the new patron is seen in the list of patrons in the "View All Patrons" screen.

View All Room Bookings

The librarian can access the "View All Room Bookings" screen from the navigation menu and this screen would be the same as the "View Room Bookings" page for patron except that the librarian would be able to see all room bookings for all patrons that currently exist in the system and will also be able to cancel a room booking by pressing the "Cancel" button under a room booking.

Browse All Item Reservations

Item Reservations

The librarian can go to the "Browse Item Reservations" screen to see all existing Item Reservations for all patrons. They can also cancel an existing item reservation or renew it by pressing the "cancel" and "renew" buttons respectively.

Browse All Items, Reserve Item for Patron and Return Item

Browse all Items Reserve Item
Browse Items Reserve Item

A librarian can go to "Items" from the Navigation Menu and click on the reserve button under an item to access the "Reserve Item" screen shown above. Once in the this screen, the librarian can enter the patron's ID for whom they want to reserve the item and click submit to create the item reservation. The librarian can also click on return to return an item if it is checked out. If the item is not checked out, the system will let the librarian know by throwing an error.

Checkout Item

Browse all Items Checkout Item
Browse Items Checkout Item

When logged in as a librarian, the librarian can go to "Items" from the navigation menu and press on checkout to check out items for a patron, if there is no reservation for that item already. This will create an item reservation for them that will last two weeks. If there is a reservation and it is for the patron that would like to check it out, then it will simply update that reservation to state that it is checked out, and extend the reservation to two weeks from “today” if possible. If there was already a reservation for a different patron, the application will simply prevent the item from being checked out.

Reserve Room for A Patron

Reserve Room

When logged in as a librarian, the librarian can browse all rooms - this view is identical to what a patron sees, with the exception of the added ‘Reserve’ buttons under each room card. Once the button is clicked, the librarian is prompted with the reserve room screen in which they can view the selected card, as well as input values for the patron’s id number, the date, start time and end time. Once the inputs are provided, the submit button can be pressed to finish the booking process.

Clone this wiki locally