Skip to content

Setting up

stardustgd edited this page Mar 29, 2023 · 9 revisions

Setting up

Welcome to the AVC Interactive Map Project! What we will do in this page is:

  • Install the necessary tools
  • Clone the repository
  • Set up an Android Studio emulator
  • Build the project

Prerequisites


Cloning the Repository

After you have Git installed, you can clone the repository, which means to grab this project from GitHub to your local computer.

Using the terminal:

# Create a directory for the project
mkdir InteractiveCampusMap

# Clone the repo into the directory
git clone https://github.com/AVC-CS-Committee/InteractiveCampusMap.git InteractiveCampusMap

Using GitHub Desktop:

  • In GitHub Desktop, select Clone a Repository and use the following URL: https://github.com/AVC-CS-Committee/InteractiveCampusMap.git
  • Select the repository and in the main window there should be a button to press called Open with Android Studio
    • Note: The project will take a while to load, look at the bottom right corner in Android Studio, it should show different Gradle related items being installed/configured. Wait until all installations stop and the project is fully loaded.
  • You should now be able to push/pull code to/from the repo.

Setting your API key

Follow the tutorial to get your own API key. The API key is used to be able to use the map within the app. Once you have your API key, navigate to your local.properties file and create a variable called MAPS_API_KEY. Set the value of this variable to your API key (e.g. MAPS_API_KEY="mykey").

IMPORTANT: NEVER reference your API key anywhere in the code. Your API key must go into your local.properties file!


Setting up the Emulator

To set up an emulator in Android Studio, navigate to ToolsDevice Manager

Device Manager

In the Device Manager, click Create Device and choose any device with the highest API Level available for the device.

Create Device

After the system image has been downloaded, you can click Finish and the emulator is ready to use!


Build the Project

Once a device has been either created or connected (depends if you are using the emulator or a physical device), you can now build and run the project. To do so, press the green play button in the top right corner (shortcut is Shift+F10).

Build Project


Summary

You've successfully set up the AVC Interactive Map and are now ready for development and testing! Check out the rest of the wiki to learn more about the file structure of the project, what each class does, and more!