-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
-
Download Android Studio Here. This is where we write the code. Click next on the setup page unless you would like to change the default settings. Once the setup wizard page opens, click Next twice, then make sure the UI theme is darcula and click next a third time and click finish. This may take a while to install completely.
-
Set up WSL Here.
-
install git.
a. first run this line in ubuntu.
apt-get install git
Ubuntu might tell you to usesudo apt-get install git
instead.
Next, sign in to www.github.com, or sign up if you do not have an account. Make sure to remember the username you give, this will be important for later.b. go back to the terminal and run this command, but replace "your_username" with your own name (keep the quotation marks):
git config –global user.name "your_username"
and this command, replacing "your_emailid" with your own email address (keep the quotation marks):
git config –global user.email "your_emailid"
these commands will link your username and email to your computer, so GitHub knows who authored your commits. -
clone the shuttle-tracker-android repository. Run the command
git clone https://github.com/wtg/Shuttle-Tracker-Android.git
The code should be found in the folder titled Shuttle-Tracker-Android. -
Open android studio again, click open and navigate to the shuttle tracker project.
-
Once the shuttle tracker project has been cloned, and you have access to commits, create a new folder in the
ShuttleTrackerAndroid/app/src
directory, named debug. In theShuttleTrackerAndroid/app/src/debug
directory, create a folder named res. And in theShuttleTrackerAndroid/app/src/debug/res
directory, create a folder called values. Now you should have access to theShuttleTrackerAndroid/app/src/debug/res/values
directory, which you can use to run your own API. -
(Potentially Optional) If you complete steps 1 through 6 and you are receiving the build tools is corrupted issue, use this link to Stack Overflow to solve the problem and put yourself back on track because of an error on Google's part: Here.
-
In order to set up the virtual android phone, you will need to complete these steps:
a. First create a file calledgoogle_maps_api.xml
atShuttleTrackerAndroid/app/src/debug/res/values
, copy-paste this text in the section of the code that tells you to insert it into, and make sure to generate your API key and put it in.<resources> <!-- TODO: Before you run your application, you need a Google Maps API key. Alternatively, follow the directions here: https://developers.google.com/maps/documentation/android/start#get-key Once you have your key (it starts with "AIza"), replace the "google_maps_key" string in this file. --> <string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">INSERT_KEY_HERE</string> </resources>
b. Get your own custom google maps API key. Here's a guide that details how to get one for yourself: Here
c. Once you have received your custom API key, you should paste the API in the labeled section of the code. With that, you can move on to the final step of running the virtual android phone.
d. Finally, on Android Studio, install the Pixel 5 API version 31 (Also known as Android S) by clicking the top right of your screen and using the debug configurations to set it to that API version. After following all these steps, you will be able to run the virtual Android and see the differences in your code contributions.
Once that's all done, congrats. You are now ready to start development for the RCOS Shuttle Tracker Android app.