NOTE: this file is in Markdown format and is best viewed on GitHub at the following location: https://github.com/aclissold/Proxima/blob/master/README.md
Proxima is a new social media image sharing app with a twist. Take a photo to add it to the public map. Proxima users can then view and comment on it—but only once they've gotten close enough! Have a blast exploring campus, the park, or wherever, discovering hundreds of memories worth thousands of words.
If you haven't already, you will need to download Android Studio with the Android SDK.
After you've installed Android Studio, launch it and run the SDK Manager
.
Note that you may have to generate a dummy project for this button to be visible. These are the exact packages you'll need to install by clicking their respective checkboxes and then Install packages…. If the exact versions are not available, newer versions will probably suffice.
- Tools
- Android SDK Tools rev. 23.0.5
- Android SDK Platform-tools rev. 21
- Android SDK Build-tools rev. 21.1.1
- Android 5.0 (API 21)
- SDK Platform API 21 rev. 1
- Google APIs Intel x86 Atom (not Atom_64) System Image API 21 rev. 2
- Extras
- Android Support Repository rev. 9
- Android Support Library rev. 21.0.2
- Intel x86 Emulator Accelerator (HAXM Installer) rev. 5.2
If you're not deploying to a physical device, here's how to configure the emulator.
From within Android Studio, run the AVD Manager .
Then, follow these steps.
- Create Virtual Device…
- Choose Nexus 6 and click Next
- Select Lollipop (API 21) targeting Google APIs (this is important or the Google map won't work) and click Next
- Now that you're on the Configure AVD screen, most default settings should be appropriate, but you'll want to use hardware acceleration and need to enable emulated front and back cameras (using a webcam may not work properly). Ensure your settings match the screenshot below exactly and click Finish.
If you don't already have the source code, run the following command:
git clone https://github.com/aclissold/Proxima.git
The, run git submodule update --init
to clone the android-map-utils
dependency.
Finally, take the debug.keystore
file and move it to
~/.android/debug.keystore
on your computer.
- Linux / OS X:
mv debug.keystore ~/.android/debug.keystore
- Windows: Stick it in
C:\Users\<your username>\.android\debug.keystore
.
If you're opening the project for the first time, you'll need to select Import Project… from within Android Studio to load the newly cloned/downloaded source code.
After opening the project, simply Debug
(or Run) the project, starting up the Android Virtual Device you configured
in the previous step. If the Camera app does not show an emulated camera image,
restart the emulator.
Finally, the app will not work properly if you don't emulate location. The
easiest way to do this: from the command line, simply run the provided
./geo.sh
shell script to emulate a default location. You may have to run it
twice.
Unfortunately, Android Studio stores the configuration needed to perform unit
tests in a file that needs to be excluded in .gitignore
because it differs
for each team member, necessitating this extra step before running the tests.
Within Android Studio,
- From the system menu, select Run → Edit Configurations…
- Click the plus symbol (+) followed by Android Tests to add a test configuration
- Name it "test" or something similar next to Name:
- Set the module to "app"
- Test "All in package"
- Set the package to test to
com.proxima.test
- If desired, set target device to "Show chooser dialog". You can also specify it to only use the AVD you created previously.
- Click "OK".
Simply toggle the configuration dropdown between "app" and "test" when you want to run the app or the tests, respectively. Then Run or Debug as before.
TODO