Skip to content

Goofy-Goobers-DECO3801/ar-geotag-app

Repository files navigation

geoARt

GeoARt facilitates augmented reality geotagged art and user connectivity through a social-media style mobile app. Users can upload any form of artwork they wish, from phone images to 3D models, and make a post that is geotagged to their location. Other users can then view these posts at the location in augmented reality and leave their thoughts in likes and comments. Users have full control over their privacy and personal details through geoARt’s user profile management, managing who can see their posts and authentication.

Our Vision

Our vision is to create a vibrant community of artists and art lovers who can connect with each other and share their passion for art through geoARt, without disrupting the natural beauty of the world around.

Vision Video

Installing the app onto your Android Phone

Due to the current hardware requirements for AR, the app can only be installed on ARCore supported Android devices. Please refer to the official ARCore supported devices list.

The built APK, along with detailed instructions on how to install it to your android phone can be found on our deco3801-goofygoobers.uqcloud.net.

A walkthrough of how to get started with the app can also be found on our website or visiting the demo link below

Demo Video.

Project Structure

The project is architected using the the Model-View-ViewModel (MVVM) architecture pattern and is structured as follows:

  • firebase/ directory contains the Firebase security rules and indexes.
  • app/ directory contains the main source code for the app.
    • src/main/kotlin/com/goofygoobers/geoart/ directory contains the Kotlin source code for the app.
      • viewmodel/ contains the view models for the app that are used to store and manage the state of the UI.
      • ui/ contains the UI screens and components for the app.
      • data/ contains the database data models and repositories for the app.
      • directions/ contains all code related to querying the Google Directions API to get the directions to an artwork.
      • artdisplay/ contains all code related to the previewing and displaying of art in AR.
      • di/ contains the dependency injection modules for the app.
      • util/ contains utility functions for the app.
    • src/main/res directory contains the resources for the app.
    • src/main/python directory contains the Python script for the app that is used to convert 2D images into 3D models.
    • src/androidTest/kotlin/com/goofygoobers/geoart directory contains the Android tests for the app.
    • src/test/kotlin/com/goofygoobers/geoart directory contains the unit tests for the app.

Building from source

Prerequisite

Android Studio

The main Prerequisite is having Android Studio installed.

For detailed instructions of how to install Android Studio, please refer to the official Android documentation.

API Keys

Next you will need to setup the API keys required to build the project,

Google Maps Platform API Key

Since the app uses geolocation and displays dynamic maps a Google Maps Platform API key is required, please following the official Google Maps Platform documentation to setup an API key. The free tier of Google Maps Platform will suffice as that will give you $200 of free usage monthly. Once you have created your Google Maps Platform API, go into the Google Cloud Console, select APIs & Services and ensure that at least the following APIs are enabled:

  • Maps SDK for Android (Provides dynamic maps used on home page and art page)
  • Directions API (Provides the route information shown on the art page)
  • Maps Static API (Provides the static mini-maps on the profile page)

Once you have created and configures Google Maps Platform API, locate your key in the Google Cloud Console and copy it the local.properties file,

MAPS_API_KEY=YOUR_API_KEY
Firebase

The serverless backend of the app is powered by Firebase and a Firebase API key is required. The following steps have been extracted from the official Firebase documentation for clarity and will help you setup a Firebase project and connect it to the app.

Step 1. Create a Firebase project:

  1. Visit the Firebase console and create a Firebase account.
  2. You should be now be logged into the Firebase console, if not please revisit the link from Step
  3. Click Add project and follow the prompts.
  4. If prompted, review and accept the Firebase terms, then click Continue.
  5. Give the project a name and take note of the Project ID, and click Continue.
  6. Keep Google Analytics enabled (for future changes in the project) and click Continue.
  7. Select Default Account for Firebase as the Google Analytics account and click Create Project.

Step 2. Register the app with your Firebase project:

  1. Go to the Firebase console and select your newly created project.
  2. In the center of the project overview page, click the Android icon or Add app to launch the setup workflow.
  3. Enter the package name com.goofygoobers.geoart in the Android package name field.
  4. Click Register app
  5. Click Download google-services.json and move the downloaded google-services.json file into the app/ directory.
  6. You can now exit out of the Add Firebase to your Android app page as the Firebase SDK has already been added to the app.

Step 3. Enabled the Firebase services:

  1. Go to the Firebase console and select your newly created project.
  2. On the left hand side, click on Build then Authentication.
  3. Click on Get started to setup Authentication.
  4. Click on Sign-in method then Email/Password.
  5. Enabled Email/Password then click Save.
  6. Go back the the Build menu and select Firestore Database.
  7. Click on Create database to setup Firestore.
  8. Select Start in production mode and click Next.
  9. Select the location closest to you, in our case australia-southeast1 (Sydney) and click Enable.
  10. Go back the the Build menu and select Storage.
  11. Click on Get started to setup Storage.
  12. Select Start in production mode and click Next.
  13. If the location has not been already set refer to step 3.9 to set the location, and click Done.

Step 4. Configure the Firebase project:

  1. To configure the Firebase project with our security rules and indexes we need to use the Firebase CLI. This requires Node.js to be installed. Please install Node.js by following the official Node.js documentation

  2. Run the following gradle task in the terminal with your project ID from Step 1.6

    .\gradlew configureFirebase -PprojectId=yourProjectId
  3. When your browser opens requesting permission for Firebase CLI to connect to your account, click Allow.

Congratulations your Firebase project and APIs are setup and configured and you're now ready to build and run the app.

Building

  1. If you haven't done so already, please open the project in Android Studio.
  2. Next you need to setup an Android device to run the app. This can be a physical device connected to your computer or an emulator. To setup the device go to the Tools menu and select Device Manager. Please note that the emulators do not support AR.
  3. For an emulator select the Virtual tab and click Create Device.
  4. Select Phone and Pixel 7 Pro and click Next.
  5. Download the API 34 image and click Next then click Finish.
  6. If you want to test with a physical device select the Physical tab and click Pair using Wi-fi or connect your device to your computer.
  7. Select the App configuration and run. The first time you do this it may take several minutes as all the build dependencies will be downloaded automatically.

Testing

To test the program we are going to use the Firebase CLI you downloaded earlier to emulate the Firestore database, Storage and Authentication.

The following Android Studio configurations can be run to test the app:

  • The Android tests can be run with the Android Tests configuration.
  • The Unit tests can be run by running the Unit Tests configuration.
  • The Android Studio linter can be run with the Lint configuration.

Style

The code style of the project is enforced using ktlint, which is a style checker and formatting adhering to the Kotlin coding conventions and Android Kotlin Style Guide.

The following Android Studio configurations can be run to perform various style checks and format the code:

  • The code style can be checked by ktlint with the Style configuration.
  • The code can be formatted by ktlint with the Format configuration.

Acknowledgments

  • Jetpack Compose - Core UI library.
  • Material Design 3 - UI theme and design.
  • Firebase - Provides serverless backend (Firestore, storage, and authentication).
  • AR Core - Provides AR capabilities.
  • SceneView - Integrates AR Core with Jetpack Compose and provides open source sample assets for demo purposes.
  • Google Play Services - Used for Google Maps, and location services.
  • Google Maps Compose - Integrates Google Maps with Jetpack Compose.
  • GeoFirestore - Provides realtime geo-queries using Firebase Firestore.
  • Hilt - Provides dependency injection.
  • Coil - Async image loading and displaying.
  • Chaquopy - Used for Python interop with Kotlin.
  • pygltflib - Python package used to convert 2D images to 3D models.
  • ktlint - Code style checker and formatter.
  • Github Copilot - Aided in writing the comments for code documentation.
  • ChatGPT - Aided in creating the terms and conditions and privacy policy. Please see the appendix of the report for the full disclosure with prompts.
  • JUnit 4 - Unit testing framework.
  • AndroidX Test - Android testing framework.
  • Google Truth - Assertion library used in tests.

Code References

About

Repository for the AR Geotag App and its Components

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published